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
125a8d3c
authored
Jun 30, 2021
by
Oliver Woodman
Committed by
Ian Baker
Jul 16, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Merge pull request #9119 from chvp:media2-dispatch-previous-next
PiperOrigin-RevId: 381833313
parent
baa9a367
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerWrapper.java
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerWrapper.java
View file @
125a8d3c
...
@@ -231,23 +231,11 @@ import java.util.List;
...
@@ -231,23 +231,11 @@ import java.util.List;
}
}
public
boolean
skipToPreviousPlaylistItem
()
{
public
boolean
skipToPreviousPlaylistItem
()
{
Timeline
timeline
=
player
.
getCurrentTimeline
();
return
controlDispatcher
.
dispatchPrevious
(
player
);
Assertions
.
checkState
(!
timeline
.
isEmpty
());
int
previousWindowIndex
=
player
.
getPreviousWindowIndex
();
if
(
previousWindowIndex
!=
C
.
INDEX_UNSET
)
{
return
controlDispatcher
.
dispatchSeekTo
(
player
,
previousWindowIndex
,
C
.
TIME_UNSET
);
}
return
false
;
}
}
public
boolean
skipToNextPlaylistItem
()
{
public
boolean
skipToNextPlaylistItem
()
{
Timeline
timeline
=
player
.
getCurrentTimeline
();
return
controlDispatcher
.
dispatchNext
(
player
);
Assertions
.
checkState
(!
timeline
.
isEmpty
());
int
nextWindowIndex
=
player
.
getNextWindowIndex
();
if
(
nextWindowIndex
!=
C
.
INDEX_UNSET
)
{
return
controlDispatcher
.
dispatchSeekTo
(
player
,
nextWindowIndex
,
C
.
TIME_UNSET
);
}
return
false
;
}
}
public
boolean
skipToPlaylistItem
(
@IntRange
(
from
=
0
)
int
index
)
{
public
boolean
skipToPlaylistItem
(
@IntRange
(
from
=
0
)
int
index
)
{
...
...
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