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