mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-08 13:51:01 +02:00
Use config as source of truth when refreshed
This commit is contained in:
parent
8b81b06fc3
commit
4db2a98b0b
@ -91,13 +91,21 @@ export default function LivePlayer({
|
|||||||
// camera activity
|
// camera activity
|
||||||
|
|
||||||
const {
|
const {
|
||||||
enabled: cameraEnabled,
|
enabled: cameraWasEnabled,
|
||||||
activeMotion,
|
activeMotion,
|
||||||
activeTracking,
|
activeTracking,
|
||||||
objects,
|
objects,
|
||||||
offline,
|
offline,
|
||||||
} = useCameraActivity(cameraConfig);
|
} = useCameraActivity(cameraConfig);
|
||||||
|
|
||||||
|
const cameraEnabled = useMemo(() => {
|
||||||
|
if (!cameraWasEnabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cameraConfig.enabled;
|
||||||
|
}, [cameraConfig, cameraWasEnabled]);
|
||||||
|
|
||||||
const cameraActive = useMemo(
|
const cameraActive = useMemo(
|
||||||
() =>
|
() =>
|
||||||
!showStillWithoutActivity ||
|
!showStillWithoutActivity ||
|
||||||
|
Loading…
Reference in New Issue
Block a user