mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-26 13:47:03 +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
|
||||
|
||||
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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user