Handle seek completion
This commit is contained in:
parent
d7977241c9
commit
7a6afd52a3
@ -91,6 +91,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
onError,
|
||||
onReadyForDisplay,
|
||||
onSeek,
|
||||
onSeekComplete,
|
||||
onVolumeChange,
|
||||
onEnd,
|
||||
onPlaybackStateChanged,
|
||||
@ -488,7 +489,16 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
})
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user