From 7a6afd52a3948052cacfaab8fce856c809a8b904 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 4 Dec 2024 12:51:28 -0700 Subject: [PATCH] Handle seek completion --- src/Video.web.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Video.web.tsx b/src/Video.web.tsx index 42d3fd45..0d735946 100644 --- a/src/Video.web.tsx +++ b/src/Video.web.tsx @@ -91,6 +91,7 @@ const Video = forwardRef( onError, onReadyForDisplay, onSeek, + onSeekComplete, onVolumeChange, onEnd, onPlaybackStateChanged, @@ -488,7 +489,16 @@ const Video = forwardRef( }) } onSeeking={() => (isSeeking.current = true)} - onSeeked={() => (isSeeking.current = false)} + onSeeked={() => { + (isSeeking.current = false) + + onSeekComplete?.({ + currentTime: (nativeRef.current?.currentTime || 0.0) - cropStartSeconds, + seekTime: 0.0, + target: 0.0, + + }) + }} onVolumeChange={() => { if (!nativeRef.current) { return;