Apply playback rate

This commit is contained in:
Nicolas Mowen 2024-03-23 09:47:00 -06:00
parent fbfc53937a
commit 3c39cefbb4

View File

@ -724,6 +724,7 @@ function MotionReview({
return; return;
} }
const interval = 500 / playbackRate;
const startTime = currentTime; const startTime = currentTime;
let counter = 0; let counter = 0;
const intervalId = setInterval(() => { const intervalId = setInterval(() => {
@ -735,14 +736,14 @@ function MotionReview({
} }
setCurrentTime(startTime + counter); setCurrentTime(startTime + counter);
}, 60); }, interval);
return () => { return () => {
clearInterval(intervalId); clearInterval(intervalId);
}; };
// do not render when current time changes // do not render when current time changes
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [playing]); }, [playing, playbackRate]);
if (!relevantPreviews) { if (!relevantPreviews) {
return <ActivityIndicator />; return <ActivityIndicator />;