From 4db2a98b0b25681320f111b213ab2311abfb2105 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 20 Mar 2025 08:49:50 -0600 Subject: [PATCH] Use config as source of truth when refreshed --- web/src/components/player/LivePlayer.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index b73e7991c..a9cb33b2a 100644 --- a/web/src/components/player/LivePlayer.tsx +++ b/web/src/components/player/LivePlayer.tsx @@ -91,13 +91,21 @@ export default function LivePlayer({ // camera activity const { - enabled: cameraEnabled, + enabled: cameraWasEnabled, activeMotion, activeTracking, objects, offline, } = useCameraActivity(cameraConfig); + const cameraEnabled = useMemo(() => { + if (!cameraWasEnabled) { + return false; + } + + return cameraConfig.enabled; + }, [cameraConfig, cameraWasEnabled]); + const cameraActive = useMemo( () => !showStillWithoutActivity ||