PlaybackGlueHost.PlayerCallback

public class PlaybackGlueHost.PlayerCallback


Optional Client that implemented by PlaybackGlueHost to respond to player event.

Summary

Public constructors

Public methods

void
onBufferingStateChanged(boolean start)

notify media starts/stops buffering/preparing.

void
onError(int errorCode, CharSequence errorMessage)

notify media has error.

void
onVideoSizeChanged(int videoWidth, int videoHeight)

Size of the video changes, the Host should adjust SurfaceView's layout width and height.

Public constructors

PlayerCallback

Added in 1.1.0
public PlayerCallback()

Public methods

onBufferingStateChanged

Added in 1.1.0
public void onBufferingStateChanged(boolean start)

notify media starts/stops buffering/preparing. The Host could start or stop progress bar.

Parameters
boolean start

True for buffering start, false otherwise.

onError

Added in 1.1.0
public void onError(int errorCode, CharSequence errorMessage)

notify media has error. The Host could show error dialog.

Parameters
int errorCode

Optional error code for specific implementation.

CharSequence errorMessage

Optional error message for specific implementation.

onVideoSizeChanged

Added in 1.1.0
public void onVideoSizeChanged(int videoWidth, int videoHeight)

Size of the video changes, the Host should adjust SurfaceView's layout width and height.

Parameters
int videoWidth
int videoHeight