-
Notifications
You must be signed in to change notification settings - Fork 574
Open
Labels
Description
Version
Media3 1.6.0
More version details
No response
Devices that reproduce the issue
found via code inspection
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
media/libraries/ui_compose/src/main/java/androidx/media3/ui/compose/state/PlayPauseButtonState.kt
Lines 40 to 41 in 51efcad
val playPauseButtonState = remember(player) { PlayPauseButtonState(player) } | |
LaunchedEffect(player) { playPauseButtonState.observe() } |
The problem here is a gap between setting the initial button state in PlayPauseButtonState() and observing a change in state. The state could change in this gap without us observing it.
Android composition appears to use Dispatchers.Main for CoroutineContexts, implying that Player/Controller state could change prior to the LaunchedEffect coroutine starting.
Expected result
N/A
Actual result
N/A
Media
N/A
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.