@@ -150,6 +150,9 @@ interface VideoPlaybackProps {
150150 cursorMotionBlur ?: number ;
151151 cursorClickBounce ?: number ;
152152 cursorClipToBounds ?: boolean ;
153+ // When true, render the selected zoom at the playhead even while paused —
154+ // lets the editor preview the zoom effect without leaving the focus-edit view.
155+ isPreviewingZoom ?: boolean ;
153156}
154157
155158export interface VideoPlaybackRef {
@@ -271,6 +274,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
271274 cursorMotionBlur = DEFAULT_CURSOR_SETTINGS . motionBlur ,
272275 cursorClickBounce = DEFAULT_CURSOR_SETTINGS . clickBounce ,
273276 cursorClipToBounds = DEFAULT_CURSOR_SETTINGS . clipToBounds ,
277+ isPreviewingZoom = false ,
274278 } ,
275279 ref ,
276280 ) => {
@@ -342,6 +346,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
342346 const cursorMotionBlurRef = useRef ( cursorMotionBlur ) ;
343347 const cursorClickBounceRef = useRef ( cursorClickBounce ) ;
344348 const cursorClipToBoundsRef = useRef ( cursorClipToBounds ) ;
349+ const isPreviewingZoomRef = useRef ( isPreviewingZoom ) ;
345350 const motionBlurStateRef = useRef < MotionBlurState > ( createMotionBlurState ( ) ) ;
346351 const onTimeUpdateRef = useRef ( onTimeUpdate ) ;
347352 const onPlayStateChangeRef = useRef ( onPlayStateChange ) ;
@@ -833,6 +838,10 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
833838 cursorClipToBoundsRef . current = cursorClipToBounds ;
834839 } , [ cursorClipToBounds ] ) ;
835840
841+ useEffect ( ( ) => {
842+ isPreviewingZoomRef . current = isPreviewingZoom ;
843+ } , [ isPreviewingZoom ] ) ;
844+
836845 // Sync cursor overlay config when settings change
837846 useEffect ( ( ) => {
838847 const overlay = cursorOverlayRef . current ;
@@ -1310,7 +1319,8 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
13101319 // If a zoom is selected but video is not playing, show default unzoomed view
13111320 const selectedId = selectedZoomIdRef . current ;
13121321 const hasSelectedZoom = selectedId !== null ;
1313- const shouldShowUnzoomedView = hasSelectedZoom && ! isPlayingRef . current ;
1322+ const shouldShowUnzoomedView =
1323+ hasSelectedZoom && ! isPlayingRef . current && ! isPreviewingZoomRef . current ;
13141324
13151325 if ( region && strength > 0 && ! shouldShowUnzoomedView ) {
13161326 const zoomScale = blendedScale ?? ZOOM_DEPTH_SCALES [ region . depth ] ;
0 commit comments