mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-31 13:48:19 +02:00
Fix HLS video initial aspect on Chrome (#19805)
Explore videos are very small on Chrome specifically, this has something to do with how the latest version of Chrome loads video metadata. This change provides a default aspect ratio instead of a default height when the container ref is not defined yet
This commit is contained in:
parent
281c461647
commit
16b7f7f6e7
@ -26,7 +26,7 @@ export function useVideoDimensions(
|
||||
|
||||
const videoDimensions = useMemo(() => {
|
||||
if (!containerWidth || !containerHeight)
|
||||
return { width: "100%", height: "100%" };
|
||||
return { aspectRatio: "16 / 9", width: "100%" };
|
||||
if (containerAspectRatio > videoAspectRatio) {
|
||||
const height = containerHeight;
|
||||
const width = height * videoAspectRatio;
|
||||
|
Loading…
Reference in New Issue
Block a user