From 64a5b2ee5c791974461a40472f6b25f55fd1accf Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 17 Aug 2026 11:19:43 +0200 Subject: [PATCH] Clarify how an invalid width and height manifest --- src/utils/videoFit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/videoFit.ts b/src/utils/videoFit.ts index 2e9935c6a..16d7cb843 100644 --- a/src/utils/videoFit.ts +++ b/src/utils/videoFit.ts @@ -15,7 +15,8 @@ export function autoVideoFit( tileAspectRatio: number, ): "cover" | "contain" { if (Number.isNaN(videoAspectRatio) || Number.isNaN(tileAspectRatio)) { - // If we have invalid sizes (e.g. width or height is 0), default to cover to avoid black bars. + // If we have invalid sizes (e.g. useMeasure returns 0×0 on an initial render), + // default to cover to avoid black bars. return "cover"; }