YouTubePlayer.PlaybackEventListener
com.google.android.youtube.player.YouTubePlayer.PlaybackEventListener |
Overview
Interface definition for callbacks that are invoked when video playback events occur.
Summary
Public methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when buffering starts or ends.
| |||||||||||
Called when playback is paused, either due to
pause() or user action. | |||||||||||
Called when playback starts, either due to
play() or user action. | |||||||||||
Called when a jump in playback position occurs, either due to the user scrubbing or a seek
method being called (e.g.
| |||||||||||
Called when playback stops for a reason other than being paused, such as the video ending
or a playback error.
|
Public methods
public abstract void onBuffering (boolean isBuffering)
Called when buffering starts or ends. Note, this may occur either before or after
onPlaying()
when a video starts loading.
Parameters
isBuffering | true if the player is buffering, false otherwise.
|
public abstract void onPaused ()
Called when playback is paused, either due to pause()
or user action.
public abstract void onSeekTo (int newPositionMillis)
Called when a jump in playback position occurs, either due to the user scrubbing or a seek
method being called (e.g. seekToMillis(int)
).
Parameters
newPositionMillis | The time in milliseconds to which the player has seeked. |
public abstract void onStopped ()
Called when playback stops for a reason other than being paused, such as the video ending or a playback error.