fix: reset circle playback after completion
Some checks failed
Android CI / android (push) Has started running
Android Release / release (push) Has started running
CI / test (push) Has been cancelled

- 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:
2026-04-05 20:44:09 +03:00
parent cd161b099b
commit 95b7ddfef8

View File

@@ -2806,7 +2806,9 @@ private fun rememberManagedMediaPlayerState(
}
if (playbackState == Player.STATE_ENDED) {
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)
}
}