Skip to content

Commit

Permalink
Merge pull request #38419 from ShridharGoel/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
cead22 committed Apr 2, 2024
2 parents 630f1ae + aa15e02 commit 0ca78c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/VideoPlayer/BaseVideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}

Expand All @@ -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],
);

Expand Down

0 comments on commit 0ca78c3

Please sign in to comment.