mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-06 11:30:05 +00:00
Merge pull request #1339 from anikettuli/fix/skip-outro-endtime-clamp
fix(player): clamp skip-outro seekTo against actual video duration
This commit is contained in:
commit
e203dc883d
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue