Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

PlayerCallback

abstract class PlayerCallback
kotlin.Any
   ↳ androidx.leanback.media.PlaybackGlue.PlayerCallback

Interface to allow clients to take action once the video is ready to play and start stop.

Summary

Public constructors

Interface to allow clients to take action once the video is ready to play and start stop.

Public methods

open Unit

Event of the current media is finished.

open Unit

Event for Play/Pause state change.

open Unit

Event for isPrepared() changed.

Public constructors

<init>

PlayerCallback()

Interface to allow clients to take action once the video is ready to play and start stop.

Public methods

onPlayCompleted

open fun onPlayCompleted(glue: PlaybackGlue!): Unit

Event of the current media is finished.

Parameters
glue PlaybackGlue!: The PlaybackGlue that has finished current media playing.

onPlayStateChanged

open fun onPlayStateChanged(glue: PlaybackGlue!): Unit

Event for Play/Pause state change. See isPlaying()}.

Parameters
glue PlaybackGlue!: The PlaybackGlue that has changed playing or pausing state.

onPreparedStateChanged

open fun onPreparedStateChanged(glue: PlaybackGlue!): Unit

Event for isPrepared() changed.

Parameters
glue PlaybackGlue!: The PlaybackGlue that has changed isPrepared().