diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7f67596288..1fbce913e7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -45,6 +45,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)). * Video: * Fix `IncorrectContextUseViolation` strict mode warning on Android 11 ([#8246](https://github.com/google/ExoPlayer/pull/8246)). 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 211dfffc44..cf0b381805 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 @@ -1114,12 +1114,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 389ddd0f97..cc6affa43a 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 @@ -1519,12 +1519,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) {