From f74092a10e917862e934b12226f6827d73ccb6fb Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 9 Feb 2024 05:47:56 -0700 Subject: [PATCH] Only show the red dot when camera is recording --- web/src/components/player/LivePlayer.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index fdb5aba09..1728fbc9e 100644 --- a/web/src/components/player/LivePlayer.tsx +++ b/web/src/components/player/LivePlayer.tsx @@ -15,6 +15,7 @@ import { MdCircle, MdLeakAdd, MdSelectAll } from "react-icons/md"; import { BsSoundwave } from "react-icons/bs"; import Chip from "../Chip"; import useCameraActivity from "@/hooks/use-camera-activity"; +import { useRecordingsState } from "@/api/ws"; const emptyObject = Object.freeze({}); @@ -52,6 +53,8 @@ export default function LivePlayer({ } }, [activeMotion, activeTracking, liveReady]); + const { payload: recording } = useRecordingsState(cameraConfig.name); + // debug view settings const [showSettings, setShowSettings] = useState(false); @@ -216,9 +219,7 @@ export default function LivePlayer({ )} - {cameraConfig.record.enabled && ( - - )} + {recording == "ON" && }
{cameraConfig.name.replaceAll("_", " ")}