consistent check for aspect ratio for tall cameras

This commit is contained in:
Josh Hawkins 2024-03-03 22:17:59 -06:00
parent 60cd8e7ad8
commit 8900eee75c

View File

@ -56,7 +56,7 @@ export default function DynamicVideoPlayer({
return ( return (
config.cameras[camera].detect.width / config.cameras[camera].detect.width /
config.cameras[camera].detect.height < config.cameras[camera].detect.height <
1.7 1
); );
}, [camera, config]); }, [camera, config]);
@ -267,7 +267,7 @@ export default function DynamicVideoPlayer({
)} )}
<video <video
ref={previewRef} ref={previewRef}
className={`size-full rounded-2xl ${currentPreview != undefined && isScrubbing ? "visible" : "hidden"} ${tallVideo ? "aspect-video" : ""} bg-black`} className={`size-full rounded-2xl ${currentPreview != undefined && isScrubbing ? "visible" : "hidden"} ${tallVideo ? "aspect-tall" : ""} bg-black`}
preload="auto" preload="auto"
autoPlay autoPlay
playsInline playsInline