diff --git a/web/src/components/camera/DynamicCameraImage.tsx b/web/src/components/camera/DynamicCameraImage.tsx index 55705b15b..fb80acec7 100644 --- a/web/src/components/camera/DynamicCameraImage.tsx +++ b/web/src/components/camera/DynamicCameraImage.tsx @@ -54,7 +54,6 @@ export default function DynamicCameraImage({ if (eventIndex == -1) { const newActiveObjects = [...activeObjects, event.after.id]; setActiveObjects(newActiveObjects); - setKey(Date.now()); } } } diff --git a/web/src/pages/Live.tsx b/web/src/pages/Live.tsx index bc7d35fe3..f4f0cf80f 100644 --- a/web/src/pages/Live.tsx +++ b/web/src/pages/Live.tsx @@ -48,7 +48,7 @@ function Live() { const defaultLiveMode = useMemo(() => { if (cameraConfig) { if (restreamEnabled) { - return cameraConfig.ui.live_mode; + return cameraConfig.ui.live_mode || config?.ui.live_mode; } return "jsmpeg"; @@ -65,55 +65,75 @@ function Live() {
Live -
- - - - - - Select A Camera - - - {sortedCameras.map((item) => ( - - {item.name.replaceAll("_", " ")} +
+
+ + + + + + Select A Camera + + + {config?.birdseye.enabled && ( + + Birdseye + + )} + {sortedCameras.map((item) => ( + + {item.name.replaceAll("_", " ")} + + ))} + + + +
+
+ + + + + + Select A Live Mode + + + {restreamEnabled && ( + + Webrtc + + )} + {restreamEnabled && ( + + MSE + + )} + + Jsmpeg - ))} - - - - - - - - - Select A Live Mode - - - - Webrtc - - MSE - - Jsmpeg - - - Debug - - - - + {camera != "birdseye" && ( + + Debug + + )} + + + +
{config && camera == "birdseye" && sourceIsLoaded && ( diff --git a/web/src/utils/historyUtil.ts b/web/src/utils/historyUtil.ts index b91a3df11..5baccbb11 100644 --- a/web/src/utils/historyUtil.ts +++ b/web/src/utils/historyUtil.ts @@ -16,7 +16,7 @@ export function getHourlyTimelineData( // build a map of course to the types that are included in this hour // which allows us to know what items to keep depending on detail level - const source_to_types: { [key: string]: string[] } = {}; + const sourceToTypes: { [key: string]: string[] } = {}; let cardTypeStart: { [camera: string]: number } = {}; Object.values(hourlyTimeline["hours"][hour]).forEach((i) => { if (i.timestamp > (cardTypeStart[i.camera] ?? 0) + GROUP_SECONDS) { @@ -25,10 +25,10 @@ export function getHourlyTimelineData( const groupKey = `${i.source_id}-${cardTypeStart[i.camera]}`; - if (groupKey in source_to_types) { - source_to_types[groupKey].push(i.class_type); + if (groupKey in sourceToTypes) { + sourceToTypes[groupKey].push(i.class_type); } else { - source_to_types[groupKey] = [i.class_type]; + sourceToTypes[groupKey] = [i.class_type]; } }); @@ -61,7 +61,7 @@ export function getHourlyTimelineData( let add = true; if (detailLevel == "normal") { if ( - source_to_types[sourceKey].length > 1 && + sourceToTypes[sourceKey].length > 1 && ["active", "attribute", "gone", "stationary", "visible"].includes( i.class_type ) @@ -70,8 +70,8 @@ export function getHourlyTimelineData( } } else if (detailLevel == "extra") { if ( - source_to_types[sourceKey].length > 1 && - i.class_type in ["attribute", "gone", "visible"] + sourceToTypes[sourceKey].length > 1 && + ["attribute", "gone", "visible"].includes(i.class_type) ) { add = false; }