diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 39fa946b80..9c7a68cec6 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -35,6 +35,8 @@ * Fix focusability of `StyledPlayerView` and `StyledPlayerControlView` popup menus on API levels prior to 26 ([#9061](https://github.com/google/ExoPlayer/issues/9061)). + * Fix progress bar flickering immediately after the user seeks + ([#9049](https://github.com/google/ExoPlayer/pull/9049)). ### 2.14.1 (2021-06-11) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java index 1499aa556a..e4a88c083e 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java @@ -1155,12 +1155,8 @@ public class PlayerControlView extends FrameLayout { } else { windowIndex = player.getCurrentWindowIndex(); } - boolean dispatched = seekTo(player, windowIndex, positionMs); - if (!dispatched) { - // The seek wasn't dispatched then the progress bar scrubber will be in the wrong position. - // Trigger a progress update to snap it back. - updateProgress(); - } + seekTo(player, windowIndex, positionMs); + updateProgress(); } private boolean seekTo(Player player, int windowIndex, long positionMs) { diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java index 886bfd9f21..86086dd90b 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java @@ -1534,12 +1534,8 @@ public class StyledPlayerControlView extends FrameLayout { } else { windowIndex = player.getCurrentWindowIndex(); } - boolean dispatched = seekTo(player, windowIndex, positionMs); - if (!dispatched) { - // The seek wasn't dispatched then the progress bar scrubber will be in the wrong position. - // Trigger a progress update to snap it back. - updateProgress(); - } + seekTo(player, windowIndex, positionMs); + updateProgress(); } private boolean seekTo(Player player, int windowIndex, long positionMs) {