mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-05 17:51:36 +02:00
Fix HLS video initial aspect on Chrome
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
74f03b6f95
@ -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