mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
Non alert videos are always 16:9
This commit is contained in:
parent
097d539377
commit
8f8fcccfc3
@ -91,13 +91,17 @@ export function AnimatedEventCard({
|
|||||||
const [alertVideos] = usePersistence("alertVideos", true);
|
const [alertVideos] = usePersistence("alertVideos", true);
|
||||||
|
|
||||||
const aspectRatio = useMemo(() => {
|
const aspectRatio = useMemo(() => {
|
||||||
if (!config || !Object.keys(config.cameras).includes(event.camera)) {
|
if (
|
||||||
|
!config ||
|
||||||
|
!alertVideos ||
|
||||||
|
!Object.keys(config.cameras).includes(event.camera)
|
||||||
|
) {
|
||||||
return 16 / 9;
|
return 16 / 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
const detect = config.cameras[event.camera].detect;
|
const detect = config.cameras[event.camera].detect;
|
||||||
return detect.width / detect.height;
|
return detect.width / detect.height;
|
||||||
}, [config, event]);
|
}, [alertVideos, config, event]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user