fix: reset circle playback after completion
- seek video notes back to 0 when playback reaches the end - keep player state in sync so circles can be replayed immediately
This commit is contained in:
@@ -2806,7 +2806,9 @@ private fun rememberManagedMediaPlayerState(
|
|||||||
}
|
}
|
||||||
if (playbackState == Player.STATE_ENDED) {
|
if (playbackState == Player.STATE_ENDED) {
|
||||||
state.isPlaying = false
|
state.isPlaying = false
|
||||||
state.positionMs = player.duration.coerceAtLeast(0L)
|
runCatching { player.seekTo(0L) }
|
||||||
|
state.positionMs = 0L
|
||||||
|
state.durationMs = player.duration.coerceAtLeast(0L)
|
||||||
AppAudioFocusCoordinator.release(sourceId)
|
AppAudioFocusCoordinator.release(sourceId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user