public class

PlaybackGlueHost.PlayerCallback

extends java.lang.Object

 java.lang.Object

↳androidx.leanback.media.PlaybackGlueHost.PlayerCallback

Overview

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

Summary

Constructors
publicPlayerCallback()

Methods
public voidonBufferingStateChanged(boolean start)

notify media starts/stops buffering/preparing.

public voidonError(int errorCode, java.lang.CharSequence errorMessage)

notify media has error.

public voidonVideoSizeChanged(int videoWidth, int videoHeight)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public PlayerCallback()

Methods

public void onVideoSizeChanged(int videoWidth, int videoHeight)

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

Parameters:

videoWidth:
videoHeight:

public void onBufferingStateChanged(boolean start)

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

Parameters:

start: True for buffering start, false otherwise.

public void onError(int errorCode, java.lang.CharSequence errorMessage)

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

Parameters:

errorCode: Optional error code for specific implementation.
errorMessage: Optional error message for specific implementation.