mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Revert video dimension layout fix for chrome (#19636)
originally introduced in https://github.com/blakeblackshear/frigate/pull/19414
This commit is contained in:
parent
ec2543c23f
commit
95cea06dd3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user