Skip to content

Commit

Permalink
fix(android): playback doesn't work with 0 startPositionMs (#3784)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun authored May 17, 2024
1 parent 324b461 commit 66e0ba5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,11 @@ private void initializePlayerSource(ReactExoplayerView self, DrmSessionManager d
boolean haveResumePosition = resumeWindow != C.INDEX_UNSET;
if (haveResumePosition) {
player.seekTo(resumeWindow, resumePosition);
}
if (startPositionMs >= 0) {
player.setMediaSource(mediaSource, false);
} else if (startPositionMs > 0) {
player.setMediaSource(mediaSource, startPositionMs);
} else {
player.setMediaSource(mediaSource, !haveResumePosition);
player.setMediaSource(mediaSource, true);
}
player.prepare();
playerNeedsSource = false;
Expand Down

0 comments on commit 66e0ba5

Please sign in to comment.