Improve commands Javadoc

PiperOrigin-RevId: 364600438
This commit is contained in:
kimvde 2021-03-23 18:13:23 +00:00 committed by Ian Baker
parent b6290b1164
commit c202d406fb

View File

@ -1083,13 +1083,13 @@ public interface Player {
int COMMAND_PLAY_PAUSE = 1; int COMMAND_PLAY_PAUSE = 1;
/** Command to prepare the player, stop playback or release the player. */ /** Command to prepare the player, stop playback or release the player. */
int COMMAND_PREPARE_STOP_RELEASE = 2; int COMMAND_PREPARE_STOP_RELEASE = 2;
/** Command to seek into the current {@link MediaItem}. */ /** Command to seek into the current window. */
int COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM = 3; int COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM = 3;
/** Command to seek to the next {@link MediaItem} in the playlist. */ /** Command to seek to the default position of the next window. */
int COMMAND_SEEK_TO_NEXT_MEDIA_ITEM = 4; int COMMAND_SEEK_TO_NEXT_MEDIA_ITEM = 4;
/** Command to seek to the previous {@link MediaItem} in the playlist. */ /** Command to seek to the default position of the previous window. */
int COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM = 5; int COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM = 5;
/** Command to seek to a {@link MediaItem} in the playlist. */ /** Command to seek anywhere in any window. */
int COMMAND_SEEK_TO_MEDIA_ITEM = 6; int COMMAND_SEEK_TO_MEDIA_ITEM = 6;
/** Command to set the playback speed and pitch. */ /** Command to set the playback speed and pitch. */
int COMMAND_SET_SPEED_AND_PITCH = 7; int COMMAND_SET_SPEED_AND_PITCH = 7;
@ -1097,9 +1097,9 @@ public interface Player {
int COMMAND_SET_SHUFFLE_MODE = 8; int COMMAND_SET_SHUFFLE_MODE = 8;
/** Command to set the repeat mode. */ /** Command to set the repeat mode. */
int COMMAND_SET_REPEAT_MODE = 9; int COMMAND_SET_REPEAT_MODE = 9;
/** Command to get the current {@link MediaItem}. */ /** Command to get the {@link MediaItem} of the current window. */
int COMMAND_GET_CURRENT_MEDIA_ITEM = 10; int COMMAND_GET_CURRENT_MEDIA_ITEM = 10;
/** Command to get the {@link MediaItem MediaItems} in the playlist. */ /** Command to get the current timeline and its {@link MediaItem MediaItems}. */
int COMMAND_GET_MEDIA_ITEMS = 11; int COMMAND_GET_MEDIA_ITEMS = 11;
/** Command to get the {@link MediaItem MediaItems} metadata. */ /** Command to get the {@link MediaItem MediaItems} metadata. */
int COMMAND_GET_MEDIA_ITEMS_METADATA = 12; int COMMAND_GET_MEDIA_ITEMS_METADATA = 12;
@ -1107,15 +1107,15 @@ public interface Player {
int COMMAND_CHANGE_MEDIA_ITEMS = 13; int COMMAND_CHANGE_MEDIA_ITEMS = 13;
/** Command to get the player volume. */ /** Command to get the player volume. */
int COMMAND_GET_VOLUME = 14; int COMMAND_GET_VOLUME = 14;
/** Command to get the device volume. */ /** Command to get the device volume and whether it is muted. */
int COMMAND_GET_DEVICE_VOLUME = 15; int COMMAND_GET_DEVICE_VOLUME = 15;
/** Command to set the player volume. */ /** Command to set the player volume. */
int COMMAND_SET_VOLUME = 16; int COMMAND_SET_VOLUME = 16;
/** Command to set the device volume. */ /** Command to set the device volume and mute it. */
int COMMAND_SET_DEVICE_VOLUME = 17; int COMMAND_SET_DEVICE_VOLUME = 17;
/** Command to increment or decrement the device volume. */ /** Command to increase and decrease the device volume and mute it. */
int COMMAND_ADJUST_DEVICE_VOLUME = 18; int COMMAND_ADJUST_DEVICE_VOLUME = 18;
/** Command to set the surface on which to render the video. */ /** Command to set and clear the surface on which to render the video. */
int COMMAND_SET_VIDEO_SURFACE = 19; int COMMAND_SET_VIDEO_SURFACE = 19;
/** Command to get the text that should currently be displayed by the player. */ /** Command to get the text that should currently be displayed by the player. */
int COMMAND_GET_TEXT = 20; int COMMAND_GET_TEXT = 20;
@ -1323,6 +1323,9 @@ public interface Player {
* <p>Executing a command that is not available (for example, calling {@link #next()} if {@link * <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) is a no-op.
* *
* <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}.
*
* @param command A {@link Command}. * @param command A {@link Command}.
* @return Whether the {@link Command} is available. * @return Whether the {@link Command} is available.
* @see EventListener#onAvailableCommandsChanged(Commands) * @see EventListener#onAvailableCommandsChanged(Commands)