Skip to content

Commit 90c745d

Browse files
authored
fix: progress flicker on ios during scrub to end (#2164)
1 parent 576d393 commit 90c745d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/media/gallery/actions/VideoActionsProgress.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ export default function VideoActionsProgress({
4545
const deltaX = duration / progressBarRef.current.clientWidth;
4646
const newTime = Math.max(
4747
0,
48-
Math.min(duration, initialValue + diffX * deltaX),
48+
// 0.00001 to make time inclusive of the last frame
49+
Math.min(duration - 0.00001, initialValue + diffX * deltaX),
4950
);
51+
5052
onValueChange(newTime);
5153
}
5254

0 commit comments

Comments
 (0)