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
b7047a24
authored
Nov 24, 2020
by
olly
Committed by
Andrew Lewis
Nov 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Improve Player next/previous documentation
#exofixit Issue: #5602 PiperOrigin-RevId: 344093622
parent
06bd3a65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
17 deletions
library/core/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/Player.java
View file @
b7047a24
...
@@ -867,15 +867,21 @@ public interface Player {
...
@@ -867,15 +867,21 @@ public interface Player {
@IntDef
({
REPEAT_MODE_OFF
,
REPEAT_MODE_ONE
,
REPEAT_MODE_ALL
})
@IntDef
({
REPEAT_MODE_OFF
,
REPEAT_MODE_ONE
,
REPEAT_MODE_ALL
})
@interface
RepeatMode
{}
@interface
RepeatMode
{}
/**
/**
* Normal playback without repetition.
* Normal playback without repetition. "Previous" and "Next" actions move to the previous and next
* windows respectively, and do nothing when there is no previous or next window to move to.
*/
*/
int
REPEAT_MODE_OFF
=
0
;
int
REPEAT_MODE_OFF
=
0
;
/**
/**
* "Repeat One" mode to repeat the currently playing window infinitely.
* Repeats the currently playing window infinitely during ongoing playback. "Previous" and "Next"
* actions behave as they do in {@link #REPEAT_MODE_OFF}, moving to the previous and next windows
* respectively, and doing nothing when there is no previous or next window to move to.
*/
*/
int
REPEAT_MODE_ONE
=
1
;
int
REPEAT_MODE_ONE
=
1
;
/**
/**
* "Repeat All" mode to repeat the entire timeline infinitely.
* Repeats the entire timeline infinitely. "Previous" and "Next" actions behave as they do in
* {@link #REPEAT_MODE_OFF}, but with looping at the ends so that "Previous" when playing the
* first window will move to the last window, and "Next" when playing the last window will move to
* the first window.
*/
*/
int
REPEAT_MODE_ALL
=
2
;
int
REPEAT_MODE_ALL
=
2
;
...
@@ -1328,26 +1334,41 @@ public interface Player {
...
@@ -1328,26 +1334,41 @@ public interface Player {
/**
/**
* Returns whether a previous window exists, which may depend on the current repeat mode and
* Returns whether a previous window exists, which may depend on the current repeat mode and
* whether shuffle mode is enabled.
* whether shuffle mode is enabled.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
boolean
hasPrevious
();
boolean
hasPrevious
();
/**
/**
* Seeks to the default position of the previous window in the timeline, which may depend on the
* Seeks to the default position of the previous window, which may depend on the current repeat
* current repeat mode and whether shuffle mode is enabled. Does nothing if {@link #hasPrevious()}
* mode and whether shuffle mode is enabled. Does nothing if {@link #hasPrevious()} is {@code
* is {@code false}.
* false}.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
void
previous
();
void
previous
();
/**
/**
* Returns whether a next window exists, which may depend on the current repeat mode and whether
* Returns whether a next window exists, which may depend on the current repeat mode and whether
* shuffle mode is enabled.
* shuffle mode is enabled.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
boolean
hasNext
();
boolean
hasNext
();
/**
/**
* Seeks to the default position of the next window in the timeline, which may depend on the
* Seeks to the default position of the next window, which may depend on the current repeat mode
* current repeat mode and whether shuffle mode is enabled. Does nothing if {@link #hasNext()} is
* and whether shuffle mode is enabled. Does nothing if {@link #hasNext()} is {@code false}.
* {@code false}.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
void
next
();
void
next
();
...
@@ -1465,18 +1486,24 @@ public interface Player {
...
@@ -1465,18 +1486,24 @@ public interface Player {
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 window that will be played if {@link #next()} is called, which may
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
* depend on the current repeat mode and whether shuffle mode is enabled. Returns {@link
* currently being played is the last window or if the {@link #getCurrentTimeline() current
* C#INDEX_UNSET} if {@link #hasNext()} is {@code false}.
* timeline} is empty.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
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 window that will be played if {@link #previous()} is called, which may
* repeat mode and whether shuffle mode is enabled. Returns {@link C#INDEX_UNSET} if the window
* depend on the current repeat mode and whether shuffle mode is enabled. Returns {@link
* currently being played is the first window or if the {@link #getCurrentTimeline() current
* C#INDEX_UNSET} if {@link #hasPrevious()} is {@code false}.
* timeline} is empty.
*
* <p>Note: When the repeat mode is {@link #REPEAT_MODE_ONE}, this method behaves the same as when
* the current repeat mode is {@link #REPEAT_MODE_OFF}. See {@link #REPEAT_MODE_ONE} for more
* details.
*/
*/
int
getPreviousWindowIndex
();
int
getPreviousWindowIndex
();
...
...
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