mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Listen to playWhenReady changes in LeanbackPlayerAdapter
#minor-release Issue: google/ExoPlayer#10420 PiperOrigin-RevId: 460223064
This commit is contained in:
parent
320dcadfec
commit
c43d9f5b57
1 changed files with 8 additions and 5 deletions
|
|
@ -234,11 +234,6 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
|
|||
|
||||
// Player.Listener implementation.
|
||||
|
||||
@Override
|
||||
public void onPlaybackStateChanged(@Player.State int playbackState) {
|
||||
notifyStateChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerError(PlaybackException error) {
|
||||
Callback callback = getCallback();
|
||||
|
|
@ -283,5 +278,13 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
|
|||
int scaledWidth = Math.round(videoSize.width * videoSize.pixelWidthHeightRatio);
|
||||
getCallback().onVideoSizeChanged(LeanbackPlayerAdapter.this, scaledWidth, videoSize.height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvents(Player player, Player.Events events) {
|
||||
if (events.containsAny(
|
||||
Player.EVENT_PLAY_WHEN_READY_CHANGED, Player.EVENT_PLAYBACK_STATE_CHANGED)) {
|
||||
notifyStateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue