mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Retain playback position on re-preparation
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172736350
This commit is contained in:
parent
d09f872179
commit
08706f9bfb
1 changed files with 4 additions and 0 deletions
|
|
@ -443,6 +443,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…
Reference in a new issue