diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index 1ff5c5f37..180017eb9 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