fix(editor): wire preview-ready callback

This commit is contained in:
webadderall committed 2026-03-28 23:27:16 +11:00
1 parent 9a28d16215
commit e5ffd2d95f
1 file changed
+6
@@ -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<VideoPlaybackRef, VideoPlaybackProps>(
{
videoPath,
onDurationChange,
onPreviewReadyChange,
onTimeUpdate,
currentTime,
onPlayStateChange,
@@ -1119,6 +1121,10 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
}
}, [videoPath]);
useEffect(() => {
onPreviewReadyChange?.(videoReady);
}, [onPreviewReadyChange, videoReady]);
useEffect(() => {
if (!pixiReady || !videoReady) return;