* Don't assume video is 16 / 9

* Don't apply docker constraints for rockchp toolkit
This commit is contained in:
Nicolas Mowen
2025-08-07 11:08:33 -06:00
committed by GitHub
parent f7184c8ed5
commit 5e5beb9837
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ export function useVideoDimensions(
});
const videoAspectRatio = useMemo(() => {
return videoResolution.width / videoResolution.height || 16 / 9;
return videoResolution.width / videoResolution.height;
}, [videoResolution]);
const containerAspectRatio = useMemo(() => {
@@ -25,7 +25,7 @@ export function useVideoDimensions(
}, [containerWidth, containerHeight]);
const videoDimensions = useMemo(() => {
if (!containerWidth || !containerHeight)
if (!containerWidth || !containerHeight || !videoAspectRatio)
return { width: "100%", height: "100%" };
if (containerAspectRatio > videoAspectRatio) {
const height = containerHeight;