From 55fbd6508be4ed05e0dcfda251a6e3fc89803bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=8B=E7=9B=B4=E6=81=90=E6=83=A7=E7=97=87?= <65274728+NieR4ever@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E8=B4=9F=E6=95=B0=20(#1142)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/commonMain/kotlin/ui/guesture/VideoGestureHost.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/shared/video-player/src/commonMain/kotlin/ui/guesture/VideoGestureHost.kt b/app/shared/video-player/src/commonMain/kotlin/ui/guesture/VideoGestureHost.kt index 3f48acbc04..d7da5e3858 100644 --- a/app/shared/video-player/src/commonMain/kotlin/ui/guesture/VideoGestureHost.kt +++ b/app/shared/video-player/src/commonMain/kotlin/ui/guesture/VideoGestureHost.kt @@ -736,7 +736,7 @@ fun VideoGestureHost( if (totalDurationMillis == 0L) return@run val offsetRatio = (currentPositionMillis + seekerState.deltaSeconds.times(1000)).toFloat() / totalDurationMillis - previewPositionRatio(offsetRatio) + previewPositionRatio(offsetRatio.coerceIn(0f, 1f)) } } }