NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Check if camera is active before disabling liveReady (#12461)
Josh Hawkins5c90f7dce7b2
diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsxindex 1ff5c5f376..180017eb9e 100644--- a/web/src/components/player/LivePlayer.tsx+++ b/web/src/components/player/LivePlayer.tsx@@ -79,7 +79,15 @@ export default function LivePlayer({}if (!cameraActive) {- setTimeout(() => setLiveReady(false), 500);+ const timer = setTimeout(() => {+ if (!cameraActive) {+ setLiveReady(false);+ }+ }, 500);++ return () => {+ clearTimeout(timer);+ };}// live mode won't change// eslint-disable-next-line react-hooks/exhaustive-deps