diff --git a/web/src/views/events/RecordingView.tsx b/web/src/views/events/RecordingView.tsx index 857c5de04..1df198913 100644 --- a/web/src/views/events/RecordingView.tsx +++ b/web/src/views/events/RecordingView.tsx @@ -172,88 +172,93 @@ export function DesktopRecordingView({ Back -
- {allCameras.map((cam) => { - if (cam == mainCamera) { - return ( -
- { - videoPlayersRef.current[cam] = controller; - controller.onPlayerTimeUpdate((timestamp: number) => { - setCurrentTime(timestamp); - - allCameras.forEach((otherCam) => { - if (cam != otherCam) { - videoPlayersRef.current[otherCam]?.scrubToTimestamp( - Math.floor(timestamp), - ); - } - }); - }); - }} - /> -
- ); - } - - return ( -
+
+
+
+
{ - videoPlayersRef.current[cam] = controller; - controller.scrubToTimestamp(startTime, true); + videoPlayersRef.current[mainCamera] = controller; + controller.onPlayerTimeUpdate((timestamp: number) => { + setCurrentTime(timestamp); + + allCameras.forEach((otherCam) => { + if (mainCamera != otherCam) { + videoPlayersRef.current[otherCam]?.scrubToTimestamp( + Math.floor(timestamp), + ); + } + }); + }); }} - onClick={() => onSelectCamera(cam)} />
- ); - })} -
+
+ {allCameras.map((cam) => { + if (cam !== mainCamera) { + return ( +
+ { + videoPlayersRef.current[cam] = controller; + controller.scrubToTimestamp(startTime, true); + }} + onClick={() => onSelectCamera(cam)} + /> +
+ ); + } + return null; + })} +
+
+
-
- {severity != "significant_motion" ? ( - setScrubbing(scrubbing)} - /> - ) : ( - setScrubbing(scrubbing)} - /> - )} +
+ {severity != "significant_motion" ? ( + setScrubbing(scrubbing)} + /> + ) : ( + setScrubbing(scrubbing)} + /> + )} +
);