fix(android): playback doesn't work with 0 startPositionMs (#3784)
This commit is contained in:
parent
324b461527
commit
66e0ba579b
@ -750,11 +750,11 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user