public static interface ExoPlayer.Listener
Modifier and Type | Method and Description |
---|---|
void |
onPlayerError(ExoPlaybackException error)
Invoked when an error occurs.
|
void |
onPlayerStateChanged(boolean playWhenReady,
int playbackState)
Invoked when the value returned from either
ExoPlayer.getPlayWhenReady() or
ExoPlayer.getPlaybackState() changes. |
void |
onPlayWhenReadyCommitted()
Invoked when the current value of
ExoPlayer.getPlayWhenReady() has been reflected
by the internal playback thread. |
void onPlayerStateChanged(boolean playWhenReady, int playbackState)
ExoPlayer.getPlayWhenReady()
or
ExoPlayer.getPlaybackState()
changes.playWhenReady
- Whether playback will proceed when ready.playbackState
- One of the STATE
constants defined in the ExoPlayer
interface.void onPlayWhenReadyCommitted()
ExoPlayer.getPlayWhenReady()
has been reflected
by the internal playback thread.
An invocation of this method will shortly follow any call to
ExoPlayer.setPlayWhenReady(boolean)
that changes the state. If multiple calls are
made in rapid succession, then this method will be invoked only once, after the final state
has been reflected.
void onPlayerError(ExoPlaybackException error)
ExoPlayer.STATE_IDLE
immediately after this method is invoked. The player instance
can still be used, and ExoPlayer.release()
must still be called on the player should
it no longer be required.error
- The error.