Commit 6674f63b by bachinger Committed by Oliver Woodman

Omit fast forward and rewind actions when current window is not seekable

Issue: #4001

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189722812
parent aad5927a
...@@ -77,11 +77,10 @@ public class DefaultPlaybackController implements MediaSessionConnector.Playback ...@@ -77,11 +77,10 @@ public class DefaultPlaybackController implements MediaSessionConnector.Playback
public long getSupportedPlaybackActions(Player player) { public long getSupportedPlaybackActions(Player player) {
if (player == null || player.getCurrentTimeline().isEmpty()) { if (player == null || player.getCurrentTimeline().isEmpty()) {
return 0; return 0;
} else if (!player.isCurrentWindowSeekable()) {
return BASE_ACTIONS;
} }
long actions = BASE_ACTIONS; long actions = BASE_ACTIONS | PlaybackStateCompat.ACTION_SEEK_TO;
if (player.isCurrentWindowSeekable()) {
actions |= PlaybackStateCompat.ACTION_SEEK_TO;
}
if (fastForwardIncrementMs > 0) { if (fastForwardIncrementMs > 0) {
actions |= PlaybackStateCompat.ACTION_FAST_FORWARD; actions |= PlaybackStateCompat.ACTION_FAST_FORWARD;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment