fix preview playback rate for motion previews

This commit is contained in:
Josh Hawkins 2026-07-12 17:24:11 -05:00
parent 25087007d6
commit 74f60ae92e

View File

@ -348,6 +348,19 @@ function MotionPreviewClip({
}
}, [clipStart, clipEnd, playbackRate, preview]);
useEffect(() => {
if (!videoRef.current || !preview || !videoPlaying) {
return;
}
if (isSafari || (isFirefox && isMobile)) {
// These browsers step frames manually; rebuild the interval at the new rate
resetPlayback();
} else {
videoRef.current.playbackRate = playbackRate;
}
}, [playbackRate, preview, videoPlaying, resetPlayback]);
const drawDimOverlay = useCallback(() => {
if (!dimOverlayCanvasRef.current) {
return;