mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-11-09 15:33:31 +00:00
fix(editor): wire preview-ready callback
This commit is contained in:
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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user