YouTube

YouTubePlayer.PlaybackEventListener

experimental feature
The YouTube Android Player API is an experimental API version, which means it is still in development, though we do not expect major interface changes. Until the experimental label is removed, the Deprecation Policy for YouTube APIs won't apply to this version as discussed in the API Terms of Service.
public static interface
YouTubePlayer.PlaybackEventListener
com.google.android.youtube.player.YouTubePlayer.PlaybackEventListener

Overview

Interface definition for callbacks which are invoked when video playback events occur.

Summary

Public methods
abstract void onBuffering(boolean isBuffering)
Called when buffering starts or ends.
abstract void onPaused()
Called when playback is paused, either due to pause() or user action.
abstract void onPlaying()
Called when playback starts, either due to play() or user action.
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.
abstract void onStopped()
Called when playback stops for a reason other than being paused, e.g.

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 onPlaying ()

Called when playback starts, either due to play() 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, e.g. the video ending or a playback error.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.