Link to callback in Player getters' Javadoc

PiperOrigin-RevId: 360398175
This commit is contained in:
kimvde 2021-03-02 12:22:25 +00:00 committed by Oliver Woodman
parent 292700e93b
commit 67b18a958e
2 changed files with 29 additions and 3 deletions

View File

@ -1110,6 +1110,7 @@ public interface Player {
* Returns the current {@link State playback state} of the player. * Returns the current {@link State playback state} of the player.
* *
* @return The current {@link State playback state}. * @return The current {@link State playback state}.
* @see EventListener#onPlaybackStateChanged(int)
*/ */
@State @State
int getPlaybackState(); int getPlaybackState();
@ -1119,6 +1120,7 @@ public interface Player {
* true}, or {@link #PLAYBACK_SUPPRESSION_REASON_NONE} if playback is not suppressed. * true}, or {@link #PLAYBACK_SUPPRESSION_REASON_NONE} if playback is not suppressed.
* *
* @return The current {@link PlaybackSuppressionReason playback suppression reason}. * @return The current {@link PlaybackSuppressionReason playback suppression reason}.
* @see EventListener#onPlaybackSuppressionReasonChanged(int)
*/ */
@PlaybackSuppressionReason @PlaybackSuppressionReason
int getPlaybackSuppressionReason(); int getPlaybackSuppressionReason();
@ -1135,6 +1137,7 @@ public interface Player {
* </ul> * </ul>
* *
* @return Whether the player is playing. * @return Whether the player is playing.
* @see EventListener#onIsPlayingChanged(boolean)
*/ */
boolean isPlaying(); boolean isPlaying();
@ -1147,6 +1150,7 @@ public interface Player {
* {@link #STATE_IDLE}. * {@link #STATE_IDLE}.
* *
* @return The error, or {@code null}. * @return The error, or {@code null}.
* @see EventListener#onPlayerError(ExoPlaybackException)
*/ */
@Nullable @Nullable
ExoPlaybackException getPlayerError(); ExoPlaybackException getPlayerError();
@ -1178,6 +1182,7 @@ public interface Player {
* Whether playback will proceed when {@link #getPlaybackState()} == {@link #STATE_READY}. * Whether playback will proceed when {@link #getPlaybackState()} == {@link #STATE_READY}.
* *
* @return Whether playback will proceed when ready. * @return Whether playback will proceed when ready.
* @see EventListener#onPlayWhenReadyChanged(boolean, int)
*/ */
boolean getPlayWhenReady(); boolean getPlayWhenReady();
@ -1192,6 +1197,7 @@ public interface Player {
* Returns the current {@link RepeatMode} used for playback. * Returns the current {@link RepeatMode} used for playback.
* *
* @return The current repeat mode. * @return The current repeat mode.
* @see EventListener#onRepeatModeChanged(int)
*/ */
@RepeatMode @RepeatMode
int getRepeatMode(); int getRepeatMode();
@ -1203,13 +1209,18 @@ public interface Player {
*/ */
void setShuffleModeEnabled(boolean shuffleModeEnabled); void setShuffleModeEnabled(boolean shuffleModeEnabled);
/** Returns whether shuffling of windows is enabled. */ /**
* Returns whether shuffling of windows is enabled.
*
* @see EventListener#onShuffleModeEnabledChanged(boolean)
*/
boolean getShuffleModeEnabled(); boolean getShuffleModeEnabled();
/** /**
* Whether the player is currently loading the source. * Whether the player is currently loading the source.
* *
* @return Whether the player is currently loading the source. * @return Whether the player is currently loading the source.
* @see EventListener#onIsLoadingChanged(boolean)
*/ */
boolean isLoading(); boolean isLoading();
@ -1350,7 +1361,11 @@ public interface Player {
*/ */
void release(); void release();
/** Returns the available track groups. */ /**
* Returns the available track groups.
*
* @see EventListener#onTracksChanged(TrackGroupArray, TrackSelectionArray)
*/
TrackGroupArray getCurrentTrackGroups(); TrackGroupArray getCurrentTrackGroups();
/** /**
@ -1359,6 +1374,8 @@ public interface Player {
* <p>A concrete implementation may include null elements if it has a fixed number of renderer * <p>A concrete implementation may include null elements if it has a fixed number of renderer
* components, wishes to report a TrackSelection for each of them, and has one or more renderer * components, wishes to report a TrackSelection for each of them, and has one or more renderer
* components that is not assigned any selected tracks. * components that is not assigned any selected tracks.
*
* @see EventListener#onTracksChanged(TrackGroupArray, TrackSelectionArray)
*/ */
TrackSelectionArray getCurrentTrackSelections(); TrackSelectionArray getCurrentTrackSelections();
@ -1372,6 +1389,8 @@ public interface Player {
* *
* <p>This metadata is considered static in that it comes from the tracks' declared Formats, * <p>This metadata is considered static in that it comes from the tracks' declared Formats,
* rather than being timed (or dynamic) metadata, which is represented within a metadata track. * rather than being timed (or dynamic) metadata, which is represented within a metadata track.
*
* @see EventListener#onStaticMetadataChanged(List)
*/ */
List<Metadata> getCurrentStaticMetadata(); List<Metadata> getCurrentStaticMetadata();
@ -1381,7 +1400,11 @@ public interface Player {
@Nullable @Nullable
Object getCurrentManifest(); Object getCurrentManifest();
/** Returns the current {@link Timeline}. Never null, but may be empty. */ /**
* Returns the current {@link Timeline}. Never null, but may be empty.
*
* @see EventListener#onTimelineChanged(Timeline, int)
*/
Timeline getCurrentTimeline(); Timeline getCurrentTimeline();
/** Returns the index of the period currently being played. */ /** Returns the index of the period currently being played. */
@ -1427,6 +1450,8 @@ public interface Player {
/** /**
* Returns the media item of the current window in the timeline. May be null if the timeline is * Returns the media item of the current window in the timeline. May be null if the timeline is
* empty. * empty.
*
* @see EventListener#onMediaItemTransition(MediaItem, int)
*/ */
@Nullable @Nullable
MediaItem getCurrentMediaItem(); MediaItem getCurrentMediaItem();

View File

@ -697,6 +697,7 @@ public interface ExoPlayer extends Player {
* Returns whether the player has paused its main loop to save power in offload scheduling mode. * Returns whether the player has paused its main loop to save power in offload scheduling mode.
* *
* @see #experimentalSetOffloadSchedulingEnabled(boolean) * @see #experimentalSetOffloadSchedulingEnabled(boolean)
* @see EventListener#onExperimentalSleepingForOffloadChanged(boolean)
*/ */
boolean experimentalIsSleepingForOffload(); boolean experimentalIsSleepingForOffload();
} }