public static interface ExoPlayer.EventListener
Modifier and Type | Method and Description |
---|---|
void |
onLoadingChanged(boolean isLoading)
Called when the player starts or stops loading the source.
|
void |
onPlayerError(ExoPlaybackException error)
Called when an error occurs.
|
void |
onPlayerStateChanged(boolean playWhenReady,
int playbackState)
Called when the value returned from either
ExoPlayer.getPlayWhenReady() or
ExoPlayer.getPlaybackState() changes. |
void |
onPositionDiscontinuity()
Called when a position discontinuity occurs.
|
void |
onTimelineChanged(Timeline timeline,
Object manifest)
Called when timeline and/or manifest has been refreshed.
|
void onLoadingChanged(boolean isLoading)
isLoading
- Whether the source is currently being loaded.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 onTimelineChanged(Timeline timeline, Object manifest)
timeline
- The latest timeline, or null if the timeline is being cleared.manifest
- The latest manifest, or null if the manifest is being cleared.void onPlayerError(ExoPlaybackException error)
ExoPlayer.STATE_IDLE
immediately after this method is called. 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.void onPositionDiscontinuity()