mirror of
https://github.com/samsonjs/media.git
synced 2026-04-13 12:35:48 +00:00
Refactor SEP prepare to clarify that it is equivalent to EPI prepare.
Before this change: - SimpleExoPlayer.prepare(mediaSource) ended up calling ExoPlayerImpl.setMediaSourcesInternal() with startWindowIndex=0 and resetToDefaultPosition=false. - ExoPlayerImpl.prepare(mediaSource) ended up calling ExoPlayerImpl.setMediaSourcesInternal() with startWindowIndex=C.INDEX_UNSET and resetToDefaultPosition=true. This was functionaly equivalent but a bit confusing. #minor-release PiperOrigin-RevId: 368818143
This commit is contained in:
parent
fff7b8079a
commit
2cc51db54a
1 changed files with 1 additions and 4 deletions
|
|
@ -1354,10 +1354,7 @@ public class SimpleExoPlayer extends BasePlayer
|
|||
@Override
|
||||
public void prepare(MediaSource mediaSource, boolean resetPosition, boolean resetState) {
|
||||
verifyApplicationThread();
|
||||
setMediaSources(
|
||||
Collections.singletonList(mediaSource),
|
||||
/* startWindowIndex= */ resetPosition ? 0 : C.INDEX_UNSET,
|
||||
/* startPositionMs= */ C.TIME_UNSET);
|
||||
setMediaSources(Collections.singletonList(mediaSource), resetPosition);
|
||||
prepare();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue