Commit 4712bcfd by bachinger Committed by Oliver Woodman

use isPlaying to determine which notification action to display in compact view

PiperOrigin-RevId: 266782250
parent 284a672b
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
quality video can be loaded up to the full default buffer duration. quality video can be loaded up to the full default buffer duration.
* Bypass sniffing in `ProgressiveMediaPeriod` in case a single extractor is * Bypass sniffing in `ProgressiveMediaPeriod` in case a single extractor is
provided ([#6325](https://github.com/google/ExoPlayer/issues/6325)). provided ([#6325](https://github.com/google/ExoPlayer/issues/6325)).
* Fix `PlayerNotificationManager` to show play icon rather than pause icon when
playback is ended ([#6324](https://github.com/google/ExoPlayer/issues/6324)).
* Fix audio selection issue where languages are compared by bit rate * Fix audio selection issue where languages are compared by bit rate
([#6335](https://github.com/google/ExoPlayer/issues/6335)). ([#6335](https://github.com/google/ExoPlayer/issues/6335)).
* Add `HttpDataSource.getResponseCode` to provide the status code associated * Add `HttpDataSource.getResponseCode` to provide the status code associated
......
...@@ -1182,10 +1182,10 @@ public class PlayerNotificationManager { ...@@ -1182,10 +1182,10 @@ public class PlayerNotificationManager {
if (skipPreviousActionIndex != -1) { if (skipPreviousActionIndex != -1) {
actionIndices[actionCounter++] = skipPreviousActionIndex; actionIndices[actionCounter++] = skipPreviousActionIndex;
} }
boolean playWhenReady = player.getPlayWhenReady(); boolean isPlaying = isPlaying(player);
if (pauseActionIndex != -1 && playWhenReady) { if (pauseActionIndex != -1 && isPlaying) {
actionIndices[actionCounter++] = pauseActionIndex; actionIndices[actionCounter++] = pauseActionIndex;
} else if (playActionIndex != -1 && !playWhenReady) { } else if (playActionIndex != -1 && !isPlaying) {
actionIndices[actionCounter++] = playActionIndex; actionIndices[actionCounter++] = playActionIndex;
} }
if (skipNextActionIndex != -1) { if (skipNextActionIndex != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment