feat: slider

This commit is contained in:
2025-12-08 15:35:16 +01:00
parent c97fb0a856
commit c68dcef76d
4 changed files with 52 additions and 81 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ const ProgressSlider = ({
if (isPlaying && typeof onPause === "function") {
onPause();
}
}, [disabled, safeDuration, isPlaying, onPause, onSeekStart]);
}, [disabled, safeDuration, isPlaying, onPause, onSeekStart, progress]);
const handleSeek = useCallback(
(ratio) => {
@@ -56,7 +56,7 @@ const ProgressSlider = ({
const targetMs = safeDuration * bounded;
onSeek(targetMs);
},
[disabled, onSeek, safeDuration],
[disabled, onSeek, safeDuration]
);
const handleSeekEnd = useCallback(() => {
@@ -77,7 +77,7 @@ const ProgressSlider = ({
value={formatTime(
isSeeking && previewRatio != null
? safeDuration * previewRatio
: safePosition,
: safePosition
)}
maxValue={formatTime(safeDuration)}
progress={progress}