mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
use isPlaying to determine which notification action to display in compact view
PiperOrigin-RevId: 266782250
This commit is contained in:
parent
284a672bb3
commit
4712bcfd53
@ -11,6 +11,8 @@
|
||||
quality video can be loaded up to the full default buffer duration.
|
||||
* Bypass sniffing in `ProgressiveMediaPeriod` in case a single extractor is
|
||||
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
|
||||
([#6335](https://github.com/google/ExoPlayer/issues/6335)).
|
||||
* Add `HttpDataSource.getResponseCode` to provide the status code associated
|
||||
|
@ -1182,10 +1182,10 @@ public class PlayerNotificationManager {
|
||||
if (skipPreviousActionIndex != -1) {
|
||||
actionIndices[actionCounter++] = skipPreviousActionIndex;
|
||||
}
|
||||
boolean playWhenReady = player.getPlayWhenReady();
|
||||
if (pauseActionIndex != -1 && playWhenReady) {
|
||||
boolean isPlaying = isPlaying(player);
|
||||
if (pauseActionIndex != -1 && isPlaying) {
|
||||
actionIndices[actionCounter++] = pauseActionIndex;
|
||||
} else if (playActionIndex != -1 && !playWhenReady) {
|
||||
} else if (playActionIndex != -1 && !isPlaying) {
|
||||
actionIndices[actionCounter++] = playActionIndex;
|
||||
}
|
||||
if (skipNextActionIndex != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user