Skip to content

Commit

Permalink
Omit fast forward and rewind actions when current window is not seekable
Browse files Browse the repository at this point in the history
Issue: #4001

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189722812
  • Loading branch information
marcbaechinger authored and ojw28 committed Mar 27, 2018
1 parent aad5927 commit 6674f63
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ public DefaultPlaybackController(long rewindIncrementMs, long fastForwardIncreme
public long getSupportedPlaybackActions(Player player) {
if (player == null || player.getCurrentTimeline().isEmpty()) {
return 0;
} else if (!player.isCurrentWindowSeekable()) {
return BASE_ACTIONS;
}
long actions = BASE_ACTIONS;
if (player.isCurrentWindowSeekable()) {
actions |= PlaybackStateCompat.ACTION_SEEK_TO;
}
long actions = BASE_ACTIONS | PlaybackStateCompat.ACTION_SEEK_TO;
if (fastForwardIncrementMs > 0) {
actions |= PlaybackStateCompat.ACTION_FAST_FORWARD;
}
Expand Down

0 comments on commit 6674f63

Please sign in to comment.