From 9eb0a89de0d10ae602b53ec763d0a42c6dcf534f Mon Sep 17 00:00:00 2001 From: nrlcode Date: Wed, 25 Mar 2026 10:24:29 -0700 Subject: [PATCH] History: isolate zoom and pan UX improvements --- web/public/locales/en/views/events.json | 3 +- web/src/components/player/HlsVideoPlayer.tsx | 13 +- .../player/dynamic/DynamicVideoPlayer.tsx | 46 +++--- web/src/views/recording/RecordingView.tsx | 57 ++++++-- .../views/recording/useMobileVideoSplit.ts | 133 ++++++++++++++++++ 5 files changed, 223 insertions(+), 29 deletions(-) create mode 100644 web/src/views/recording/useMobileVideoSplit.ts diff --git a/web/public/locales/en/views/events.json b/web/public/locales/en/views/events.json index a829d3687..2fa38fabf 100644 --- a/web/public/locales/en/views/events.json +++ b/web/public/locales/en/views/events.json @@ -45,7 +45,8 @@ }, "documentTitle": "Review - Frigate", "recordings": { - "documentTitle": "Recordings - Frigate" + "documentTitle": "Recordings - Frigate", + "resizeSplit": "Resize video and timeline" }, "calendarFilter": { "last24Hours": "Last 24 Hours" diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsx index 7d762912c..81b5b1e47 100644 --- a/web/src/components/player/HlsVideoPlayer.tsx +++ b/web/src/components/player/HlsVideoPlayer.tsx @@ -38,8 +38,10 @@ export interface HlsSource { type HlsVideoPlayerProps = { videoRef: MutableRefObject; + videoClassName?: string; containerRef?: React.MutableRefObject; visible: boolean; + showControls?: boolean; currentSource: HlsSource; hotKeys: boolean; supportsFullscreen: boolean; @@ -63,8 +65,10 @@ type HlsVideoPlayerProps = { export default function HlsVideoPlayer({ videoRef, + videoClassName, containerRef, visible, + showControls = visible, currentSource, hotKeys, supportsFullscreen, @@ -286,7 +290,7 @@ export default function HlsVideoPlayer({ )} video={videoRef.current} isPlaying={isPlaying} - show={visible && (controls || controlsOpen)} + show={showControls && (controls || controlsOpen)} muted={muted} volume={volume} features={{ @@ -390,7 +394,12 @@ export default function HlsVideoPlayer({ )}