From 74f03b6f9519c4163fdebccfa50fe513263c27c3 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:16:43 -0500 Subject: [PATCH] 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 --- web/src/hooks/use-video-dimensions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/hooks/use-video-dimensions.ts b/web/src/hooks/use-video-dimensions.ts index 448dd5078..25b8af350 100644 --- a/web/src/hooks/use-video-dimensions.ts +++ b/web/src/hooks/use-video-dimensions.ts @@ -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;