mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Document specialties of the Player interface when timeline is empty
According to the discussion in <unknown commit>. PiperOrigin-RevId: 318473575
This commit is contained in:
parent
eb9de7a120
commit
b9511697f6
1 changed files with 16 additions and 4 deletions
|
|
@ -841,6 +841,8 @@ public interface Player {
|
||||||
* C#TIME_UNSET} is passed, the default position of the given window is used. In any case, if
|
* C#TIME_UNSET} is passed, the default position of the given window is used. In any case, if
|
||||||
* {@code startWindowIndex} is set to {@link C#INDEX_UNSET}, this parameter is ignored and the
|
* {@code startWindowIndex} is set to {@link C#INDEX_UNSET}, this parameter is ignored and the
|
||||||
* position is not reset at all.
|
* position is not reset at all.
|
||||||
|
* @throws IllegalSeekPositionException If the provided {@code windowIndex} is not within the
|
||||||
|
* bounds of the list of media items.
|
||||||
*/
|
*/
|
||||||
void setMediaItems(List<MediaItem> mediaItems, int startWindowIndex, long startPositionMs);
|
void setMediaItems(List<MediaItem> mediaItems, int startWindowIndex, long startPositionMs);
|
||||||
|
|
||||||
|
|
@ -1064,6 +1066,8 @@ public interface Player {
|
||||||
*
|
*
|
||||||
* @param windowIndex The index of the window whose associated default position should be seeked
|
* @param windowIndex The index of the window whose associated default position should be seeked
|
||||||
* to.
|
* to.
|
||||||
|
* @throws IllegalSeekPositionException If the player has a non-empty timeline and the provided
|
||||||
|
* {@code windowIndex} is not within the bounds of the current timeline.
|
||||||
*/
|
*/
|
||||||
void seekToDefaultPosition(int windowIndex);
|
void seekToDefaultPosition(int windowIndex);
|
||||||
|
|
||||||
|
|
@ -1223,21 +1227,25 @@ public interface Player {
|
||||||
int getCurrentPeriodIndex();
|
int getCurrentPeriodIndex();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the index of the window currently being played.
|
* Returns the index of the current {@link Timeline.Window window} in the {@link
|
||||||
|
* #getCurrentTimeline() timeline}, or the prospective window index if the {@link
|
||||||
|
* #getCurrentTimeline() current timeline} is empty.
|
||||||
*/
|
*/
|
||||||
int getCurrentWindowIndex();
|
int getCurrentWindowIndex();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the index of the next timeline window to be played, which may depend on the current
|
* Returns the index of the next timeline window to be played, which may depend on the current
|
||||||
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
|
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
|
||||||
* currently being played is the last window.
|
* currently being played is the last window or if the {@link #getCurrentTimeline() current
|
||||||
|
* timeline} is empty.
|
||||||
*/
|
*/
|
||||||
int getNextWindowIndex();
|
int getNextWindowIndex();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the index of the previous timeline window to be played, which may depend on the current
|
* Returns the index of the previous timeline window to be played, which may depend on the current
|
||||||
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
|
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
|
||||||
* currently being played is the first window.
|
* currently being played is the first window or if the {@link #getCurrentTimeline() current
|
||||||
|
* timeline} is empty.
|
||||||
*/
|
*/
|
||||||
int getPreviousWindowIndex();
|
int getPreviousWindowIndex();
|
||||||
|
|
||||||
|
|
@ -1262,7 +1270,11 @@ public interface Player {
|
||||||
*/
|
*/
|
||||||
long getDuration();
|
long getDuration();
|
||||||
|
|
||||||
/** Returns the playback position in the current content window or ad, in milliseconds. */
|
/**
|
||||||
|
* Returns the playback position in the current content window or ad, in milliseconds, or the
|
||||||
|
* prospective position in milliseconds if the {@link #getCurrentTimeline() current timeline} is
|
||||||
|
* empty.
|
||||||
|
*/
|
||||||
long getCurrentPosition();
|
long getCurrentPosition();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue