diff --git a/src/VideoPlayer.tsx b/src/VideoPlayer.tsx index faf4bb8..101281b 100644 --- a/src/VideoPlayer.tsx +++ b/src/VideoPlayer.tsx @@ -436,9 +436,13 @@ export const VideoPlayer = (props: VideoPlayerProps) => { onPressRewind={() => videoRef?.current?.seek(currentTime - rewindTime) } - onPressForward={() => - videoRef?.current?.seek(currentTime + rewindTime) - } + onPressForward={() => { + if (currentTime + rewindTime > duration) { + videoRef?.current?.seek(duration - 0.1); + } else { + videoRef?.current?.seek(currentTime + rewindTime); + } + }} />