-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Decoder reuse in MediaSessionConnector #5891
Comments
Good question ;). I doubt there's a good reason... @marcbaechinger - Think we can safely remove the |
Issue: #5891 PiperOrigin-RevId: 248369509
Issue: #5891 PiperOrigin-RevId: 248369509
Just to document the potential change in behavior after this change: A
That is because this seek will be treated as a seek in the old media due to the missing stop operation. This may (or may not) cause unexpected effects for the start position in the new media even if we keep the position. If that problem occurs, it can be fixed by calling |
As discussed, we need a slightly bigger change to correctly handle all cases. Reopening. |
Issue: #5891 PiperOrigin-RevId: 248541827
Issue: #5891 PiperOrigin-RevId: 248369509
Issue: #5891 PiperOrigin-RevId: 248541827
I know this now closed, but I have an issue after updating to 2.10.2. My music applications prepare the player with the latest playing queue when it starts, but now my "play" buttons (which uses the MediaControllerCompat.TransportControls) fails because the player is in READY state, so the onPlay() callback in MediaSessionConnector does nothing this is because the setPlayWhenReady() has been removed from onPlay() funny thing, if I use the play button in the Notification from the PlayerNotificationManager, it works since the onReceive calls dispatchSetPlayWhenReady() how to solve this? TIA |
@loki666 Could you please open a new issue to discuss this question/problem? |
[REQUIRED] Searched documentation and issues
Recent Improved decoder reuse in ExoPlayer blog post explains how to make sure your app benefits from decoder reuse:
I noticed MediaSessionConnector.java calls stopPlayerForPrepare(boolean playWhenReady) before preparing new source.
[REQUIRED] Question
Is there a reason why MediaSessionConnector calls player.stop() before preparing new source? Is this not against best practices for decoder reuse?
The text was updated successfully, but these errors were encountered: