diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsx index 7941680d1..c06d1a1e8 100644 --- a/web/src/components/player/HlsVideoPlayer.tsx +++ b/web/src/components/player/HlsVideoPlayer.tsx @@ -88,26 +88,33 @@ export default function HlsVideoPlayer({ const [controlsOpen, setControlsOpen] = useState(false); return ( -
{ - setControls(true); - } - : undefined - } - onMouseOut={ - isDesktop - ? () => { - setControls(controlsOpen); - } - : undefined - } - onClick={isDesktop ? undefined : () => setControls(!controls)} - > - - + +
{ + setControls(true); + } + : undefined + } + onMouseOut={ + isDesktop + ? () => { + setControls(controlsOpen); + } + : undefined + } + onClick={isDesktop ? undefined : () => setControls(!controls)} + > + - - { - if (!videoRef.current) { - return; - } + { + if (!videoRef.current) { + return; + } - if (play) { - videoRef.current.play(); - } else { - videoRef.current.pause(); - } - }} - onSeek={(diff) => { - const currentTime = videoRef.current?.currentTime; + if (play) { + videoRef.current.play(); + } else { + videoRef.current.pause(); + } + }} + onSeek={(diff) => { + const currentTime = videoRef.current?.currentTime; - if (!videoRef.current || !currentTime) { - return; - } + if (!videoRef.current || !currentTime) { + return; + } - videoRef.current.currentTime = Math.max(0, currentTime + diff); - }} - onSetPlaybackRate={(rate) => - videoRef.current ? (videoRef.current.playbackRate = rate) : null - } - /> - {children} -
+ videoRef.current.currentTime = Math.max(0, currentTime + diff); + }} + onSetPlaybackRate={(rate) => + videoRef.current ? (videoRef.current.playbackRate = rate) : null + } + /> + {children} +
+ ); } diff --git a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx index 5e9d9eb78..ae15fff8e 100644 --- a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx +++ b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx @@ -55,7 +55,7 @@ export default function DynamicVideoPlayer({ if (aspectRatio > 2) { return ""; } else if (aspectRatio < 16 / 9) { - return "aspect-tall"; + return isDesktop ? "" : "aspect-tall"; } else { return "aspect-video"; } @@ -169,7 +169,7 @@ export default function DynamicVideoPlayer({ }, [controller, recordings]); return ( -
+