Skip to content

Commit

Permalink
Reset playback speed when live speed control becomes unused
Browse files Browse the repository at this point in the history
Issue: #8664
#minor-release
PiperOrigin-RevId: 360877086
  • Loading branch information
marcbaechinger authored and icbaker committed Mar 12, 2021
1 parent 8fbb971 commit 8dc63dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* Core
* Move `getRendererCount` and `getRendererType` methods from `Player` to
`ExoPlayer`.
* Reset playback speed when live playback speed control becomes unused
([#8664](https://github.com/google/ExoPlayer/issues/8664)).
* Remove deprecated symbols:
* Remove `Player.DefaultEventListener`. Use `Player.EventListener`
instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,10 @@ private void updateLivePlaybackSpeedControl(
MediaPeriodId oldPeriodId,
long positionForTargetOffsetOverrideUs) {
if (newTimeline.isEmpty() || !shouldUseLivePlaybackSpeedControl(newTimeline, newPeriodId)) {
// Live playback speed control is unused.
// Live playback speed control is unused for the current period, reset speed if adjusted.
if (mediaClock.getPlaybackParameters().speed != playbackInfo.playbackParameters.speed) {
mediaClock.setPlaybackParameters(playbackInfo.playbackParameters);
}
return;
}
int windowIndex = newTimeline.getPeriodByUid(newPeriodId.periodUid, period).windowIndex;
Expand Down

0 comments on commit 8dc63dd

Please sign in to comment.