mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Merge pull request #9119 from chvp:media2-dispatch-previous-next
PiperOrigin-RevId: 381833313
This commit is contained in:
parent
baa9a367e2
commit
125a8d3caa
1 changed files with 2 additions and 14 deletions
|
|
@ -231,23 +231,11 @@ import java.util.List;
|
|||
}
|
||||
|
||||
public boolean skipToPreviousPlaylistItem() {
|
||||
Timeline timeline = player.getCurrentTimeline();
|
||||
Assertions.checkState(!timeline.isEmpty());
|
||||
int previousWindowIndex = player.getPreviousWindowIndex();
|
||||
if (previousWindowIndex != C.INDEX_UNSET) {
|
||||
return controlDispatcher.dispatchSeekTo(player, previousWindowIndex, C.TIME_UNSET);
|
||||
}
|
||||
return false;
|
||||
return controlDispatcher.dispatchPrevious(player);
|
||||
}
|
||||
|
||||
public boolean skipToNextPlaylistItem() {
|
||||
Timeline timeline = player.getCurrentTimeline();
|
||||
Assertions.checkState(!timeline.isEmpty());
|
||||
int nextWindowIndex = player.getNextWindowIndex();
|
||||
if (nextWindowIndex != C.INDEX_UNSET) {
|
||||
return controlDispatcher.dispatchSeekTo(player, nextWindowIndex, C.TIME_UNSET);
|
||||
}
|
||||
return false;
|
||||
return controlDispatcher.dispatchNext(player);
|
||||
}
|
||||
|
||||
public boolean skipToPlaylistItem(@IntRange(from = 0) int index) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue