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
13fb0baf
authored
Jun 26, 2021
by
Charlotte Van Petegem
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use better builtin ControlDispatcher methods in media2 extension
parent
9df2e42d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 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 @
13fb0baf
...
@@ -233,21 +233,13 @@ import java.util.List;
...
@@ -233,21 +233,13 @@ import java.util.List;
public
boolean
skipToPreviousPlaylistItem
()
{
public
boolean
skipToPreviousPlaylistItem
()
{
Timeline
timeline
=
player
.
getCurrentTimeline
();
Timeline
timeline
=
player
.
getCurrentTimeline
();
Assertions
.
checkState
(!
timeline
.
isEmpty
());
Assertions
.
checkState
(!
timeline
.
isEmpty
());
int
previousWindowIndex
=
player
.
getPreviousWindowIndex
();
return
controlDispatcher
.
dispatchPrevious
(
player
);
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
();
Timeline
timeline
=
player
.
getCurrentTimeline
();
Assertions
.
checkState
(!
timeline
.
isEmpty
());
Assertions
.
checkState
(!
timeline
.
isEmpty
());
int
nextWindowIndex
=
player
.
getNextWindowIndex
();
return
controlDispatcher
.
dispatchNext
(
player
);
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