mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Apply playback rate
This commit is contained in:
parent
fbfc53937a
commit
3c39cefbb4
@ -724,6 +724,7 @@ function MotionReview({
|
||||
return;
|
||||
}
|
||||
|
||||
const interval = 500 / playbackRate;
|
||||
const startTime = currentTime;
|
||||
let counter = 0;
|
||||
const intervalId = setInterval(() => {
|
||||
@ -735,14 +736,14 @@ function MotionReview({
|
||||
}
|
||||
|
||||
setCurrentTime(startTime + counter);
|
||||
}, 60);
|
||||
}, interval);
|
||||
|
||||
return () => {
|
||||
clearInterval(intervalId);
|
||||
};
|
||||
// do not render when current time changes
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [playing]);
|
||||
}, [playing, playbackRate]);
|
||||
|
||||
if (!relevantPreviews) {
|
||||
return <ActivityIndicator />;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user