placeboplayer/app
Davíð Steinn Geirsson 2f4b415e2f Fix stuck paused state by toggling playWhenReady to force ExoPlayer re-evaluation
ExoPlayer's play() is a no-op when playWhenReady is already true. After a
pipeline rebuild (stop() doesn't reset playWhenReady), the player can get
stuck with playWhenReady=true but isPlaying=false. Subsequent play() calls
do nothing. Fix by calling pause() before play() to toggle playWhenReady
off then on, forcing ExoPlayer to re-evaluate its state machine.

Three fixes:
- verifyPlaybackStarted(): toggle playWhenReady instead of redundant play()
- resume(): detect stuck playWhenReady=true and toggle before play()
- onOutputDeviceChanged(): add verifyPlaybackStarted() safety net after
  pipeline rebuild

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:31:44 +00:00
..
src Fix stuck paused state by toggling playWhenReady to force ExoPlayer re-evaluation 2026-03-27 14:31:44 +00:00
build.gradle.kts Fix AudioFocusHandlerTest Robolectric configuration 2026-01-25 13:58:23 +00:00
proguard-rules.pro Add release build signing and configuration 2026-01-10 03:31:47 +00:00