-
Notifications
You must be signed in to change notification settings - Fork 315
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
ForwardingPlayer that stops events gets MediaController out of sync #163
Comments
Thanks for reporting! Interesting case. :) Reason for the wrong behaviour you describe: We are masking the state change to Your case of the very example of For other
That works dynamically as well. Your app could (besides suppression reason) do so when With the above, an app has an API to cover the Said all this, I didn't go through all the |
In this case, play is not a no-op, it triggers a UI flow that if completed in 15 seconds, will start playback. We just can't start yet. So we need the command to be enabled. Being enabled also means this flow can work when this comes externally via the service, like assistant or the system media controls. It sounds like my current clunky workaround is close to the best course of action. Interestingly, I think @tonihei suggested @PlayWhenReadyChangeReason instead of @PlaybackSuppressionReason, but I'm happy to change. |
If it's really WAI, then perhaps just a change to document what you've described above. To me this is the point of the Forwarding player, it can override the effect of each command. But if it breaks things we should document how to fix. |
Do you think setting the suppression reason We should look into a mechanism that sends a single update of the |
Media3 Version
1.0.0-beta02
Devices that reproduce the issue
Emulator
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Use the horologist media-sample.
MediaController -> MediaSession -> WearConfiguredPlayer -> ExoPlayer.
WearConfiguredPlayer will open the Bluetooth fragment if no headphones are connected, ignoring the play() command.
If you close the fragment without selecting headphones, you end up on the player screen. Hitting play again will open the fragment again. After closing the fragment again, the player State is out of sync.
Workaround is to fire an event - see PR in https://github.com/google/horologist/pull/558/files
Expected result
MediaController - playWhenReady = true
ExoPlayer - playWhenReady = false
Actual result
MediaController - playWhenReady = false
ExoPlayer - playWhenReady = false
Media
Uamp content in media-sample
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: