feat: slider
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user