mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
Send discontinuity at adjustments after shuffle/repeat mode changes.
This commit is contained in:
parent
56c1c3f6a7
commit
75b9062583
1 changed files with 6 additions and 2 deletions
|
|
@ -474,8 +474,12 @@ import java.io.IOException;
|
|||
// position of the playing period to make sure none of the removed period is played.
|
||||
MediaPeriodId periodId = playingPeriodHolder.info.id;
|
||||
long newPositionUs = seekToPeriodPosition(periodId, playbackInfo.positionUs);
|
||||
playbackInfo = playbackInfo.fromNewPosition(periodId, newPositionUs,
|
||||
playbackInfo.contentPositionUs);
|
||||
if (newPositionUs != playbackInfo.positionUs) {
|
||||
playbackInfo = playbackInfo.fromNewPosition(periodId, newPositionUs,
|
||||
playbackInfo.contentPositionUs);
|
||||
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, Player.DISCONTINUITY_REASON_INTERNAL,
|
||||
0, playbackInfo).sendToTarget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue