MediaControllerGlue

Added in 1.1.0
Deprecated in 1.1.0

abstract class MediaControllerGlue : PlaybackControlGlue


A helper class for implementing a glue layer for MediaControllerCompat.

Summary

Public constructors

MediaControllerGlue(
    context: Context!,
    fastForwardSpeeds: IntArray<Int>!,
    rewindSpeeds: IntArray<Int>!
)

This function is deprecated. Deprecated in Java

Public functions

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

Drawable!

This function is deprecated. Deprecated in Java

MediaControllerCompat!

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

CharSequence!

This function is deprecated. Deprecated in Java

CharSequence!

This function is deprecated. Deprecated in Java

Long

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit
play(speed: Int)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Inherited Constants

From androidx.leanback.media.PlaybackControlGlue
const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

const Int

This property is deprecated. Deprecated in Java

Inherited functions

From androidx.leanback.widget.OnActionClickedListener
abstract Unit

This function is deprecated. Deprecated in Java

From androidx.leanback.media.PlaybackControlGlue
Unit

This function is deprecated. Deprecated in Java

PlaybackControlsRow!

This function is deprecated. Deprecated in Java

PlaybackControlsRowPresenter!

This function is deprecated.

PlaybackControlGlue supports any PlaybackRowPresenter, use getPlaybackRowPresenter.

Array<Int>!

This function is deprecated. Deprecated in Java

PlaybackRowPresenter!

This function is deprecated. Deprecated in Java

Array<Int>!

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit
onCreateSecondaryActions(secondaryActionsAdapter: ArrayObjectAdapter!)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Boolean
onKey(v: View!, keyCode: Int, event: KeyEvent!)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated.

PlaybackControlGlue supports any PlaybackRowPresenter, use setPlaybackRowPresenter.

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

From androidx.leanback.media.PlaybackGlue
Unit

This function is deprecated. Deprecated in Java

Context

This function is deprecated. Deprecated in Java

PlaybackGlueHost?

This function is deprecated. Deprecated in Java

(Mutable)List<PlaybackGlue.PlayerCallback!>?

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

From android.view.View.OnKeyListener
abstract Boolean
onKey(p: View!, p1: Int, p2: KeyEvent!)

This function is deprecated. Deprecated in Java

Public constructors

MediaControllerGlue

Added in 1.1.0
Deprecated in 1.1.0
MediaControllerGlue(
    context: Context!,
    fastForwardSpeeds: IntArray<Int>!,
    rewindSpeeds: IntArray<Int>!
)

Constructor for the glue.

Parameters
context: Context!
fastForwardSpeeds: IntArray<Int>!

Array of seek speeds for fast forward.

rewindSpeeds: IntArray<Int>!

Array of seek speeds for rewind.

Public functions

attachToMediaController

Added in 1.1.0
Deprecated in 1.1.0
fun attachToMediaController(mediaController: MediaControllerCompat!): Unit

Attaches to the given media controller.

detach

Added in 1.1.0
Deprecated in 1.1.0
fun detach(): Unit

Detaches from the media controller. Must be called when the object is no longer needed.

getCurrentPosition

fun getCurrentPosition(): Int

Returns the current position of the media item in milliseconds.

getCurrentSpeedId

fun getCurrentSpeedId(): Int

Returns the current playback speed. When playing normally, PLAYBACK_SPEED_NORMAL should be returned.

getMediaArt

fun getMediaArt(): Drawable!

Returns a bitmap of the art for the media item.

getMediaController

Added in 1.1.0
Deprecated in 1.1.0
fun getMediaController(): MediaControllerCompat!

Returns the media controller currently attached.

getMediaDuration

fun getMediaDuration(): Int

Returns the duration of the media item in milliseconds.

getMediaSubtitle

fun getMediaSubtitle(): CharSequence!

Returns the subtitle of the media item.

getMediaTitle

fun getMediaTitle(): CharSequence!

Returns the title of the media item.

getSupportedActions

fun getSupportedActions(): Long

Returns a bitmask of actions supported by the media player.

hasValidMedia

fun hasValidMedia(): Boolean

Returns true if there is a valid media item.

isMediaPlaying

fun isMediaPlaying(): Boolean

Returns true if media is currently playing.

next

fun next(): Unit

Goes to the next media item. This method is optional.

pause

fun pause(): Unit

Pauses the media player.

play

fun play(speed: Int): Unit

Start playback at the given speed.

Parameters
speed: Int

The desired playback speed. For normal playback this will be PLAYBACK_SPEED_NORMAL; higher positive values for fast forward, and negative values for rewind.

previous

fun previous(): Unit

Goes to the previous media item. This method is optional.