Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1a190ff9
authored
Mar 02, 2021
by
kimvde
Committed by
marcbaechinger
Apr 09, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Link to callback in Player getters' Javadoc
PiperOrigin-RevId: 360398175
parent
bcd0a91e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
library/common/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
library/common/src/main/java/com/google/android/exoplayer2/Player.java
View file @
1a190ff9
...
@@ -1133,6 +1133,7 @@ public interface Player {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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 {
...
@@ -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
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
View file @
1a190ff9
...
@@ -682,6 +682,7 @@ public interface ExoPlayer extends Player {
...
@@ -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
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment