diff --git a/src/components/VideoPlayer/BaseVideoPlayer.js b/src/components/VideoPlayer/BaseVideoPlayer.js index 91737ad3938a..7016de3fa86c 100644 --- a/src/components/VideoPlayer/BaseVideoPlayer.js +++ b/src/components/VideoPlayer/BaseVideoPlayer.js @@ -114,7 +114,7 @@ function BaseVideoPlayer({ const currentDuration = e.durationMillis || videoDuration * 1000; const currentPositon = e.positionMillis || 0; - if (shouldReplayVideo(e, isVideoPlaying, currentDuration, currentPositon)) { + if (shouldReplayVideo(e, isPlaying, currentDuration, currentPositon)) { videoPlayerRef.current.setStatusAsync({positionMillis: 0, shouldPlay: true}); } @@ -127,6 +127,7 @@ function BaseVideoPlayer({ videoStateRef.current = e; onPlaybackStatusUpdate(e); }, + // eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to trigger this when isPlaying changes because isPlaying is only used inside shouldReplayVideo [onPlaybackStatusUpdate, preventPausingWhenExitingFullscreen, videoDuration], );