You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MediaSession play/pause events not propagated to LeanbackPlayerAdapter #10420
Connect player with a MediaSession and try to play/pause the video using mobile.
Expected result
When clicking play/pause the controls overlay should be triggered and their state updated.
It seems that the LeanbackPlayerAdapterlistens to onPlaybackStateChanged player events, but play/pause action called from MediaSessionConnector. directly on a Player instance triggers only onPlayWhenReadyChanged event, which is not handled in the LeanbackPlayerAdapter.
By using ForwadingPlayer when setting player for the MediaSessionConnector. you can workaround this issue:
mediaSessionConnector.setPlayer(object : ForwardingPlayer(player) {
override fun play() {
playerAdapter.play()
}
override fun pause() {
playerAdapter.pause()
}
override fun stop() {
playerAdapter.pause()
}
})
Actual result
Controls overlay is not triggered and play/pause action stays in previous incorrect state.
Media
Not applicable
Bug Report
You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.
Thank you for reporting this. We submitted a fix (this issue will be updated once the commit is pushed the dev-v2 branch) which will be included in the next release (2.18.1 or 2.19.0, which ever comes first).
Activity
christosts commentedon Jul 11, 2022
Thank you for reporting this. We submitted a fix (this issue will be updated once the commit is pushed the dev-v2 branch) which will be included in the next release (2.18.1 or 2.19.0, which ever comes first).
Listen to playWhenReady changes in LeanbackPlayerAdapter
Listen to playWhenReady changes in LeanbackPlayerAdapter
Listen to playWhenReady changes in LeanbackPlayerAdapter
Listen to playWhenReady changes in LeanbackPlayerAdapter