Motion review playback optimizations (#10659)

* handle motion timestamps with ranges

* check for overlaps when checking segment for events

* rename motion color vars to significant_motion for consistency

* safelist significant_motion

* rename vars for clarity and use timeout instead of interval
This commit is contained in:
Josh Hawkins
2024-03-24 20:37:44 -06:00
committed by GitHub
parent 24d29dd32c
commit 7b64091128
9 changed files with 163 additions and 129 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export const useMotionSegmentUtils = (
const interpolateMotionAudioData = useCallback(
(value: number, newMax: number): number => {
return Math.ceil((Math.abs(value) / 100.0) * newMax) || 1;
return Math.ceil((Math.abs(value) / 100.0) * newMax) || 0;
},
[],
);