Update PlayerView's UI when available commands change
PiperOrigin-RevId: 395395015
This commit is contained in:
parent
dd33afb335
commit
6452364c1c
@ -32,6 +32,8 @@
|
|||||||
([#9024](https://github.com/google/ExoPlayer/issues/9024)).
|
([#9024](https://github.com/google/ExoPlayer/issues/9024)).
|
||||||
* Fix accessibility focus in `PlayerControlView`
|
* Fix accessibility focus in `PlayerControlView`
|
||||||
([#9111](https://github.com/google/ExoPlayer/issues/9111)).
|
([#9111](https://github.com/google/ExoPlayer/issues/9111)).
|
||||||
|
* Fix issue that `StyledPlayerView` and `PlayerView` don't update UI
|
||||||
|
when available player commands change.
|
||||||
* Cast extension:
|
* Cast extension:
|
||||||
* Implement `CastPlayer.setPlaybackParameters(PlaybackParameters)` to
|
* Implement `CastPlayer.setPlaybackParameters(PlaybackParameters)` to
|
||||||
support setting the playback speed
|
support setting the playback speed
|
||||||
|
@ -20,6 +20,7 @@ import static com.google.android.exoplayer2.Player.COMMAND_SEEK_FORWARD;
|
|||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_IN_CURRENT_WINDOW;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_IN_CURRENT_WINDOW;
|
||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT;
|
||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS;
|
||||||
|
import static com.google.android.exoplayer2.Player.EVENT_AVAILABLE_COMMANDS_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_IS_PLAYING_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_IS_PLAYING_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_STATE_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_STATE_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_PLAY_WHEN_READY_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_PLAY_WHEN_READY_CHANGED;
|
||||||
@ -1314,7 +1315,8 @@ public class PlayerControlView extends FrameLayout {
|
|||||||
EVENT_REPEAT_MODE_CHANGED,
|
EVENT_REPEAT_MODE_CHANGED,
|
||||||
EVENT_SHUFFLE_MODE_ENABLED_CHANGED,
|
EVENT_SHUFFLE_MODE_ENABLED_CHANGED,
|
||||||
EVENT_POSITION_DISCONTINUITY,
|
EVENT_POSITION_DISCONTINUITY,
|
||||||
EVENT_TIMELINE_CHANGED)) {
|
EVENT_TIMELINE_CHANGED,
|
||||||
|
EVENT_AVAILABLE_COMMANDS_CHANGED)) {
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
}
|
}
|
||||||
if (events.containsAny(EVENT_POSITION_DISCONTINUITY, EVENT_TIMELINE_CHANGED)) {
|
if (events.containsAny(EVENT_POSITION_DISCONTINUITY, EVENT_TIMELINE_CHANGED)) {
|
||||||
|
@ -20,6 +20,7 @@ import static com.google.android.exoplayer2.Player.COMMAND_SEEK_FORWARD;
|
|||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_IN_CURRENT_WINDOW;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_IN_CURRENT_WINDOW;
|
||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT;
|
||||||
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS;
|
import static com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS;
|
||||||
|
import static com.google.android.exoplayer2.Player.EVENT_AVAILABLE_COMMANDS_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_IS_PLAYING_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_IS_PLAYING_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_PARAMETERS_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_PARAMETERS_CHANGED;
|
||||||
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_STATE_CHANGED;
|
import static com.google.android.exoplayer2.Player.EVENT_PLAYBACK_STATE_CHANGED;
|
||||||
@ -1770,7 +1771,8 @@ public class StyledPlayerControlView extends FrameLayout {
|
|||||||
EVENT_POSITION_DISCONTINUITY,
|
EVENT_POSITION_DISCONTINUITY,
|
||||||
EVENT_TIMELINE_CHANGED,
|
EVENT_TIMELINE_CHANGED,
|
||||||
EVENT_SEEK_BACK_INCREMENT_CHANGED,
|
EVENT_SEEK_BACK_INCREMENT_CHANGED,
|
||||||
EVENT_SEEK_FORWARD_INCREMENT_CHANGED)) {
|
EVENT_SEEK_FORWARD_INCREMENT_CHANGED,
|
||||||
|
EVENT_AVAILABLE_COMMANDS_CHANGED)) {
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
}
|
}
|
||||||
if (events.containsAny(EVENT_POSITION_DISCONTINUITY, EVENT_TIMELINE_CHANGED)) {
|
if (events.containsAny(EVENT_POSITION_DISCONTINUITY, EVENT_TIMELINE_CHANGED)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user