PlaybackGlueHost.PlayerCallback


class PlaybackGlueHost.PlayerCallback


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

Summary

Public constructors

Public functions

Unit

notify media starts/stops buffering/preparing.

Unit
onError(errorCode: Int, errorMessage: CharSequence!)

notify media has error.

Unit
onVideoSizeChanged(videoWidth: Int, videoHeight: Int)

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

Public constructors

PlayerCallback

Added in 1.1.0
PlayerCallback()

Public functions

onBufferingStateChanged

Added in 1.1.0
fun onBufferingStateChanged(start: Boolean): Unit

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

Parameters
start: Boolean

True for buffering start, false otherwise.

onError

Added in 1.1.0
fun onError(errorCode: Int, errorMessage: CharSequence!): Unit

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

Parameters
errorCode: Int

Optional error code for specific implementation.

errorMessage: CharSequence!

Optional error message for specific implementation.

onVideoSizeChanged

Added in 1.1.0
fun onVideoSizeChanged(videoWidth: Int, videoHeight: Int): Unit

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

Parameters
videoWidth: Int
videoHeight: Int