From 160121c8cc73d3ebdef3bd1761722d29f0f07ec0 Mon Sep 17 00:00:00 2001 From: webadderall <131426131+webadderall@users.noreply.github.com> Date: Sat, 28 Mar 2026 23:27:16 +1100 Subject: [PATCH] fix(editor): wire preview-ready callback --- src/components/video-editor/VideoPlayback.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx index 0e8fe195..55431df1 100644 --- a/src/components/video-editor/VideoPlayback.tsx +++ b/src/components/video-editor/VideoPlayback.tsx @@ -148,6 +148,7 @@ function getEffectiveNativeAspectRatio( interface VideoPlaybackProps { videoPath: string; onDurationChange: (duration: number) => void; + onPreviewReadyChange?: (ready: boolean) => void; onTimeUpdate: (time: number) => void; currentTime: number; onPlayStateChange: (playing: boolean) => void; @@ -220,6 +221,7 @@ const VideoPlayback = forwardRef( { videoPath, onDurationChange, + onPreviewReadyChange, onTimeUpdate, currentTime, onPlayStateChange, @@ -1119,6 +1121,10 @@ const VideoPlayback = forwardRef( } }, [videoPath]); + useEffect(() => { + onPreviewReadyChange?.(videoReady); + }, [onPreviewReadyChange, videoReady]); + useEffect(() => { if (!pixiReady || !videoReady) return;