mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-09 00:02:48 +03:00
Add ability to add legacy birdseye to camera groups (#10404)
* initial try * add birdseye * remove vite * cleanup * memoize * remove console * ensure birdseye is actually enabled in config * birdseye first in select list and fix jsmpeg player size
This commit is contained in:
@@ -11,6 +11,14 @@ function Live() {
|
||||
const [selectedCameraName, setSelectedCameraName] = useOverlayState("camera");
|
||||
const [cameraGroup] = useOverlayState("cameraGroup");
|
||||
|
||||
const includesBirdseye = useMemo(() => {
|
||||
if (config && cameraGroup) {
|
||||
return config.camera_groups[cameraGroup].cameras.includes("birdseye");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}, [config, cameraGroup]);
|
||||
|
||||
const cameras = useMemo(() => {
|
||||
if (!config) {
|
||||
return [];
|
||||
@@ -40,6 +48,7 @@ function Live() {
|
||||
return (
|
||||
<LiveDashboardView
|
||||
cameras={cameras}
|
||||
includeBirdseye={includesBirdseye}
|
||||
onSelectCamera={setSelectedCameraName}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user