diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 2e6463afb4..45a301bb23 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -30,6 +30,8 @@ * OkHttp extension: Upgrade OkHttp dependency to 3.12.7, which fixes a class of `SocketTimeoutException` issues when using HTTP/2 ([#4078](https://github.com/google/ExoPlayer/issues/4078)). +* Don't use notification chronometer if playback speed is != 1.0 + ([#6816](https://github.com/google/ExoPlayer/issues/6816)). ### 2.11.1 (2019-12-20) ### diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index 2dd82bdec6..047041dd60 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -927,7 +927,18 @@ public class PlayerNotificationManager { } /** - * Sets whether the elapsed time of the media playback should be displayed + * Sets whether the elapsed time of the media playback should be displayed. + * + *
Note that this setting only works if all of the following are true: + * + *
See {@link NotificationCompat.Builder#setUsesChronometer(boolean)}. * @@ -1084,7 +1095,8 @@ public class PlayerNotificationManager { && useChronometer && player.isPlaying() && !player.isPlayingAd() - && !player.isCurrentWindowDynamic()) { + && !player.isCurrentWindowDynamic() + && player.getPlaybackParameters().speed == 1f) { builder .setWhen(System.currentTimeMillis() - player.getContentPosition()) .setShowWhen(true)