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;
|
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 />;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user