mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Check if camera is active before disabling liveReady (#12461)
This commit is contained in:
parent
b7cf5f4105
commit
5c90f7dce7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user