diff --git a/web/src/components/player/DynamicVideoPlayer.tsx b/web/src/components/player/DynamicVideoPlayer.tsx index 9f9c41076..c2a9503fc 100644 --- a/web/src/components/player/DynamicVideoPlayer.tsx +++ b/web/src/components/player/DynamicVideoPlayer.tsx @@ -40,6 +40,19 @@ export default function DynamicVideoPlayer({ [config] ); + // playback behavior + const tallVideo = useMemo(() => { + if (!config) { + return false; + } + + return ( + config.cameras[camera].detect.width / + config.cameras[camera].detect.height < + 1.7 + ); + }, [config]); + // controlling playback const playerRef = useRef(undefined); @@ -64,6 +77,7 @@ export default function DynamicVideoPlayer({ }, [config]); // keyboard control + const onKeyboardShortcut = useCallback( (key: string, down: boolean, repeat: boolean) => { switch (key) { @@ -185,6 +199,8 @@ export default function DynamicVideoPlayer({ return ; } + //console.log(`${config.detect.width / config.detect.height < 1.7 ? "16:9" : undefined}`) + return (
{