mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
filter review items and motion to be main camera in recordings view only (#10403)
This commit is contained in:
parent
8c0275fe2f
commit
dce2e9b366
@ -53,6 +53,11 @@ export function DesktopRecordingView({
|
||||
|
||||
const [playbackStart, setPlaybackStart] = useState(startTime);
|
||||
|
||||
const mainCameraReviewItems = useMemo(
|
||||
() => reviewItems.filter((cam) => cam.camera == mainCamera),
|
||||
[reviewItems, mainCamera],
|
||||
);
|
||||
|
||||
// timeline time
|
||||
|
||||
const timeRange = useMemo(() => getChunkedTimeDay(startTime), [startTime]);
|
||||
@ -139,6 +144,7 @@ export function DesktopRecordingView({
|
||||
before: timeRange.end,
|
||||
after: timeRange.start,
|
||||
scale: SEGMENT_DURATION / 2,
|
||||
cameras: mainCamera,
|
||||
},
|
||||
]
|
||||
: null,
|
||||
@ -229,7 +235,7 @@ export function DesktopRecordingView({
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems}
|
||||
events={mainCameraReviewItems}
|
||||
severityType={severity}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={(scrubbing) => setScrubbing(scrubbing)}
|
||||
@ -243,7 +249,7 @@ export function DesktopRecordingView({
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems}
|
||||
events={mainCameraReviewItems}
|
||||
motion_events={motionData ?? []}
|
||||
severityType={severity}
|
||||
contentRef={contentRef}
|
||||
@ -295,6 +301,11 @@ export function MobileRecordingView({
|
||||
[selectedRangeIdx, timeRange],
|
||||
);
|
||||
|
||||
const mainCameraReviewItems = useMemo(
|
||||
() => reviewItems.filter((cam) => cam.camera == playbackCamera),
|
||||
[reviewItems, playbackCamera],
|
||||
);
|
||||
|
||||
// move to next clip
|
||||
useEffect(() => {
|
||||
if (!controllerRef.current) {
|
||||
@ -356,6 +367,7 @@ export function MobileRecordingView({
|
||||
before: timeRange.end,
|
||||
after: timeRange.start,
|
||||
scale: SEGMENT_DURATION / 2,
|
||||
cameras: playbackCamera,
|
||||
},
|
||||
]
|
||||
: null,
|
||||
@ -424,7 +436,7 @@ export function MobileRecordingView({
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems}
|
||||
events={mainCameraReviewItems}
|
||||
severityType={severity}
|
||||
contentRef={contentRef}
|
||||
onHandlebarDraggingChange={(scrubbing) => setScrubbing(scrubbing)}
|
||||
@ -438,7 +450,7 @@ export function MobileRecordingView({
|
||||
showHandlebar
|
||||
handlebarTime={currentTime}
|
||||
setHandlebarTime={setCurrentTime}
|
||||
events={reviewItems}
|
||||
events={mainCameraReviewItems}
|
||||
motion_events={motionData ?? []}
|
||||
severityType={severity}
|
||||
contentRef={contentRef}
|
||||
|
Loading…
Reference in New Issue
Block a user