Document execution of unavailable command

PiperOrigin-RevId: 365044658
This commit is contained in:
kimvde 2021-03-25 15:39:17 +00:00 committed by Oliver Woodman
parent e42004652a
commit 9be84e4998
2 changed files with 4 additions and 1 deletions

View file

@ -13,6 +13,8 @@
`onPositionDiscontinuity(int)` callback
([#6163](https://github.com/google/ExoPlayer/issues/6163),
[#4768](https://github.com/google/ExoPlayer/issues/4768)).
* Add `isCommandAvailable` method and `onAvailableCommandsChanged`
listener to query the commands that can be executed on the player.
* UI:
* Add builder for `PlayerNotificationManager`.
* Add group setting to `PlayerNotificationManager`.

View file

@ -1447,7 +1447,8 @@ public interface Player {
* <p>This method does not execute the command.
*
* <p>Executing a command that is not available (for example, calling {@link #next()} if {@link
* #COMMAND_SEEK_TO_NEXT_MEDIA_ITEM} is unavailable) is a no-op.
* #COMMAND_SEEK_TO_NEXT_MEDIA_ITEM} is unavailable) will neither throw an exception nor generate
* a {@link #getPlayerError()} player error}.
*
* <p>{@link #COMMAND_SEEK_TO_NEXT_MEDIA_ITEM} and {@link #COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM}
* are unavailable if there is no such {@link MediaItem}.