This commit is contained in:
Aniket Tuli 2026-07-28 13:53:42 +08:00 committed by GitHub
commit 34221aaf87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,7 +384,10 @@ private fun BoxScope.RenderPlaybackOverlays(
skipIntervalDismissed = skipIntervalDismissed,
controlsVisible = controlsVisible,
onSkipInterval = { interval ->
playerController?.seekTo((interval.endTime * 1000).toLong())
val rawMs = (interval.endTime * 1000.0).toLong()
val durationMs = playbackSnapshot.durationMs
val seekMs = if (durationMs > 0L) rawMs.coerceAtMost(durationMs - 1) else rawMs
playerController?.seekTo(seekMs)
scheduleProgressSyncAfterSeek()
skipIntervalDismissed = true
},