Add references in javadocs to relevant listeners for Player fields

PiperOrigin-RevId: 638688864
This commit is contained in:
jbibik 2024-05-30 09:59:26 -07:00 committed by Copybara-Service
parent 43f719fbb2
commit a652c5b3f5
2 changed files with 24 additions and 3 deletions

View file

@ -2433,7 +2433,7 @@ public interface Player {
* change. * change.
* *
* @return The currently available {@link Commands}. * @return The currently available {@link Commands}.
* @see Listener#onAvailableCommandsChanged * @see Listener#onAvailableCommandsChanged(Commands)
*/ */
Commands getAvailableCommands(); Commands getAvailableCommands();
@ -2935,6 +2935,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_METADATA} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_METADATA} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onMediaMetadataChanged(MediaMetadata)
*/ */
MediaMetadata getMediaMetadata(); MediaMetadata getMediaMetadata();
@ -2944,6 +2946,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_METADATA} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_METADATA} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onPlaylistMetadataChanged(MediaMetadata)
*/ */
MediaMetadata getPlaylistMetadata(); MediaMetadata getPlaylistMetadata();
@ -3242,6 +3246,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_AUDIO_ATTRIBUTES} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_AUDIO_ATTRIBUTES} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onAudioAttributesChanged(AudioAttributes)
*/ */
AudioAttributes getAudioAttributes(); AudioAttributes getAudioAttributes();
@ -3263,6 +3269,7 @@ public interface Player {
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
* *
* @return The linear gain applied to all audio channels. * @return The linear gain applied to all audio channels.
* @see Listener#onVolumeChanged(float)
*/ */
@FloatRange(from = 0, to = 1.0) @FloatRange(from = 0, to = 1.0)
float getVolume(); float getVolume();
@ -3409,6 +3416,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_TEXT} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_TEXT} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onCues(CueGroup)
*/ */
CueGroup getCurrentCues(); CueGroup getCurrentCues();
@ -3431,6 +3440,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_DEVICE_VOLUME} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_DEVICE_VOLUME} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onDeviceVolumeChanged(int, boolean)
*/ */
@IntRange(from = 0) @IntRange(from = 0)
int getDeviceVolume(); int getDeviceVolume();
@ -3443,6 +3454,8 @@ public interface Player {
* *
* <p>This method must only be called if {@link #COMMAND_GET_DEVICE_VOLUME} is {@linkplain * <p>This method must only be called if {@link #COMMAND_GET_DEVICE_VOLUME} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
*
* @see Listener#onDeviceVolumeChanged(int, boolean)
*/ */
boolean isDeviceMuted(); boolean isDeviceMuted();

View file

@ -1627,7 +1627,11 @@ public interface ExoPlayer extends Player {
@UnstableApi @UnstableApi
void setAudioSessionId(int audioSessionId); void setAudioSessionId(int audioSessionId);
/** Returns the audio session identifier, or {@link C#AUDIO_SESSION_ID_UNSET} if not set. */ /**
* Returns the audio session identifier, or {@link C#AUDIO_SESSION_ID_UNSET} if not set.
*
* @see Listener#onAudioSessionIdChanged(int)
*/
@UnstableApi @UnstableApi
int getAudioSessionId(); int getAudioSessionId();
@ -1657,7 +1661,11 @@ public interface ExoPlayer extends Player {
@UnstableApi @UnstableApi
void setSkipSilenceEnabled(boolean skipSilenceEnabled); void setSkipSilenceEnabled(boolean skipSilenceEnabled);
/** Returns whether skipping silences in the audio stream is enabled. */ /**
* Returns whether skipping silences in the audio stream is enabled.
*
* @see Listener#onSkipSilenceEnabledChanged(boolean)
*/
@UnstableApi @UnstableApi
boolean getSkipSilenceEnabled(); boolean getSkipSilenceEnabled();