Player.Listener.onPlayWhenReadyChange not called in CastPlayer Remote Playback
Open
@tanay187 is already working on this.
Since Jun 23, 2026.
bug
needs triage
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.9.2
More version details
There's an intermittent bug that after some connect-disconnect to the cast device, the Player.Listener.onPlayWhenReadyChange not called despite the player.playWhenReady is successfully changed.
Some workaround is to listen to Player.Listener.onEvents
override fun onEvents(player: Player, events: Player.Events) {
super.onEvents(player, events)
if (events.contains(Player.EVENT_PLAY_WHEN_READY_CHANGED)) {
// This is called
}
}
Devices that reproduce the issue
Emulator
Devices that do not reproduce the issue
Reproducible in the demo app?
Not tested
Reproduction steps
It's an intermittent bug, but the steps roughly:
- Connect -> Disconnect -> Connect
- Toggle the
playWhenReady
Expected result
onPlayWhenReadyChange is called when CastPlayer.playWhenReady changed.
Actual result
onPlayWhenReadyChange is not called
Media
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.