Revert video dimension layout fix for chrome (#19636)

originally introduced in https://github.com/blakeblackshear/frigate/pull/19414
This commit is contained in:
Josh Hawkins 2025-08-19 14:42:20 -05:00 committed by GitHub
parent ec2543c23f
commit 95cea06dd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@ export function useVideoDimensions(
});
const videoAspectRatio = useMemo(() => {
return videoResolution.width / videoResolution.height;
return videoResolution.width / videoResolution.height || 16 / 9;
}, [videoResolution]);
const containerAspectRatio = useMemo(() => {
@ -25,7 +25,7 @@ export function useVideoDimensions(
}, [containerWidth, containerHeight]);
const videoDimensions = useMemo(() => {
if (!containerWidth || !containerHeight || !videoAspectRatio)
if (!containerWidth || !containerHeight)
return { width: "100%", height: "100%" };
if (containerAspectRatio > videoAspectRatio) {
const height = containerHeight;