Retain playback position on re-preparation
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172736350
This commit is contained in:
parent
ce0a03dbdf
commit
006263e983
@ -430,6 +430,10 @@ import java.io.IOException;
|
||||
loadControl.onPrepared();
|
||||
if (resetPosition) {
|
||||
playbackInfo = new PlaybackInfo(0, C.TIME_UNSET);
|
||||
} else {
|
||||
// The new start position is the current playback position.
|
||||
playbackInfo = new PlaybackInfo(playbackInfo.periodId, playbackInfo.positionUs,
|
||||
playbackInfo.contentPositionUs);
|
||||
}
|
||||
this.mediaSource = mediaSource;
|
||||
mediaSource.prepareSource(player, true, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user