PlayerCallback
open class PlayerCallback
kotlin.Any | |
↳ | androidx.leanback.media.PlaybackGlueHost.PlayerCallback |
Optional Client that implemented by PlaybackGlueHost to respond to player event.
Summary
Public constructors | |
---|---|
<init>() Optional Client that implemented by PlaybackGlueHost to respond to player event. |
Public methods | |
---|---|
open Unit |
onBufferingStateChanged(start: Boolean) notify media starts/stops buffering/preparing. |
open Unit |
onError(errorCode: Int, errorMessage: CharSequence!) notify media has error. |
open Unit |
onVideoSizeChanged(videoWidth: Int, videoHeight: Int) Size of the video changes, the Host should adjust SurfaceView's layout width and height. |
Public constructors
<init>
PlayerCallback()
Optional Client that implemented by PlaybackGlueHost to respond to player event.
Public methods
onBufferingStateChanged
open 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
open 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. |