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;
|
boolean haveResumePosition = resumeWindow != C.INDEX_UNSET;
|
||||||
if (haveResumePosition) {
|
if (haveResumePosition) {
|
||||||
player.seekTo(resumeWindow, resumePosition);
|
player.seekTo(resumeWindow, resumePosition);
|
||||||
}
|
player.setMediaSource(mediaSource, false);
|
||||||
if (startPositionMs >= 0) {
|
} else if (startPositionMs > 0) {
|
||||||
player.setMediaSource(mediaSource, startPositionMs);
|
player.setMediaSource(mediaSource, startPositionMs);
|
||||||
} else {
|
} else {
|
||||||
player.setMediaSource(mediaSource, !haveResumePosition);
|
player.setMediaSource(mediaSource, true);
|
||||||
}
|
}
|
||||||
player.prepare();
|
player.prepare();
|
||||||
playerNeedsSource = false;
|
playerNeedsSource = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user