Skip to content

Commit

Permalink
fix: looping in android
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Nov 14, 2024
1 parent 9cd9a6b commit a674901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/VideoPlayer/BaseVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function BaseVideoPlayer({
const currentDuration = status.durationMillis || videoDuration * 1000;
const currentPositon = status.positionMillis || 0;

if (shouldReplayVideo(status, isVideoPlaying, currentDuration, currentPositon)) {
if (shouldReplayVideo(status, isVideoPlaying, currentDuration, currentPositon) && !isEnded) {
videoPlayerRef.current?.setStatusAsync({positionMillis: 0, shouldPlay: true});
}

Expand Down

0 comments on commit a674901

Please sign in to comment.