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 marcbaechinger
parent bcd0a91ed6
commit 1a190ff90e
2 changed files with 34 additions and 4 deletions

View File

@ -1133,6 +1133,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();
@ -1142,6 +1143,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();
@ -1158,6 +1160,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();
@ -1170,6 +1173,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();
@ -1201,6 +1205,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();
@ -1215,6 +1220,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();
@ -1226,13 +1232,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();
@ -1375,10 +1386,20 @@ public interface Player {
*/ */
int getRendererType(int index); int getRendererType(int index);
/** Returns the available track groups. */ /**
* Returns the available track groups.
*
* @see EventListener#onTracksChanged(TrackGroupArray, TrackSelectionArray)
*/
TrackGroupArray getCurrentTrackGroups(); TrackGroupArray getCurrentTrackGroups();
/** Returns the current track selections for each renderer. */ /**
* Returns the current track selections for each 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 that is not assigned any selected tracks.
*/
TrackSelectionArray getCurrentTrackSelections(); TrackSelectionArray getCurrentTrackSelections();
/** /**
@ -1391,6 +1412,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();
@ -1400,7 +1423,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. */
@ -1446,6 +1473,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

@ -682,6 +682,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();
} }