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 29, 2018
1 parent 5ce0c6f commit b04ec21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Match codecs starting with "mp4a" to different Audio MimeTypes
([#3779](https://github.com/google/ExoPlayer/issues/3779)).
* MediaSession extension: Omit fast forward and rewind actions when media is not
seekable ([#4001](https://github.com/google/ExoPlayer/issues/4001)).

### 2.7.1 ###

Expand Down
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 b04ec21

Please sign in to comment.