Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling autoplay in ConcatenatingMediaSource #6665

Closed
AndrazP opened this issue Nov 18, 2019 · 3 comments
Closed

Disabling autoplay in ConcatenatingMediaSource #6665

AndrazP opened this issue Nov 18, 2019 · 3 comments
Assignees

Comments

@AndrazP
Copy link

AndrazP commented Nov 18, 2019

[REQUIRED] Searched documentation and issues

Checked ConcatenatingMediaSource, TimelineQueueNavigator, Player.EventListener documentation and source code.

[REQUIRED] Question

Is it possible to disable Disable autoplay in ConcatenatingMediaSource?
I tried to pause the player in onPositionDiscontinuity (if the reason of discontinuity is DISCONTINUITY_REASON_PERIOD_TRANSITION), but the player still plays like 1-2 seconds of the next source.

@AquilesCanta
Copy link
Contributor

@tonihei mind having a look?

@tonihei
Copy link
Collaborator

tonihei commented Nov 18, 2019

That's a duplicate of #5660.

@AndrazP
Copy link
Author

AndrazP commented Nov 19, 2019

Hi @tonihei,
thanks for linking to the similar question, it didn't show up in my search results.

So if I summarise the linked thread, it's not possible to disable/stop autoplay in ConcatenatingMediaSource before proceeding to next video.

I kindly ask you to consider supporting this case.
My application is similar to YouTube Premium. Video playback in foreground, audio in background.
Why I would still like to use ConcatenatingMediaSource vs. preparing one by one:

  • Correct media session and notification handling out of the box. If media sources are prepared one by one media notification shows incorrect state of skip to next(>>) action.
    I had to extend QueueNavigator, MediaMetadataProvider and add some workarounds to support media notifications.
    Example: Player timeline is empty between switching media sources, MediaMetadataProvider can not extract MediaMetadata and MediaController is not able to receive MediaMetadata needed to show in notification. Skipping between items from notification is not smooth.
  • Build in lazy preparation, nicer transitions between videos.

@google google locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants