mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-27 13:47:50 +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(() => {
|
const videoAspectRatio = useMemo(() => {
|
||||||
return videoResolution.width / videoResolution.height;
|
return videoResolution.width / videoResolution.height || 16 / 9;
|
||||||
}, [videoResolution]);
|
}, [videoResolution]);
|
||||||
|
|
||||||
const containerAspectRatio = useMemo(() => {
|
const containerAspectRatio = useMemo(() => {
|
||||||
@ -25,7 +25,7 @@ export function useVideoDimensions(
|
|||||||
}, [containerWidth, containerHeight]);
|
}, [containerWidth, containerHeight]);
|
||||||
|
|
||||||
const videoDimensions = useMemo(() => {
|
const videoDimensions = useMemo(() => {
|
||||||
if (!containerWidth || !containerHeight || !videoAspectRatio)
|
if (!containerWidth || !containerHeight)
|
||||||
return { width: "100%", height: "100%" };
|
return { width: "100%", height: "100%" };
|
||||||
if (containerAspectRatio > videoAspectRatio) {
|
if (containerAspectRatio > videoAspectRatio) {
|
||||||
const height = containerHeight;
|
const height = containerHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user