Register now for Android Dev Summit 2019!

MediaControllerGlue

abstract class MediaControllerGlue : PlaybackControlGlue
kotlin.Any
   ↳ androidx.leanback.media.PlaybackGlue
   ↳ androidx.leanback.media.PlaybackControlGlue
   ↳ androidx.leanback.media.MediaControllerGlue

A helper class for implementing a glue layer for MediaControllerCompat.

Summary

Inherited constants

Public constructors

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

Constructor for the glue.

Public methods

open Unit

Attaches to the given media controller.

open Unit

Detaches from the media controller.

open Int

open Int

open Drawable!

MediaControllerCompat!

Returns the media controller currently attached.

open Int

open CharSequence!

open CharSequence!

open Long

open Boolean

open Boolean

open Unit

open Unit

open Unit
play(speed: Int)

open Unit

Inherited functions

Public constructors

<init>

MediaControllerGlue(context: Context!, fastForwardSpeeds: IntArray!, rewindSpeeds: IntArray!)

Constructor for the glue.

Parameters
context Context!:
fastForwardSpeeds Context!: Array of seek speeds for fast forward.
rewindSpeeds Context!: Array of seek speeds for rewind.

Public methods

attachToMediaController

open fun attachToMediaController(mediaController: MediaControllerCompat!): Unit

Attaches to the given media controller.

detach

open fun detach(): Unit

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

getCurrentPosition

open fun getCurrentPosition(): Int

getCurrentSpeedId

open fun getCurrentSpeedId(): Int

getMediaArt

open fun getMediaArt(): Drawable!

getMediaController

fun getMediaController(): MediaControllerCompat!

Returns the media controller currently attached.

getMediaDuration

open fun getMediaDuration(): Int

getMediaSubtitle

open fun getMediaSubtitle(): CharSequence!

getMediaTitle

open fun getMediaTitle(): CharSequence!

getSupportedActions

open fun getSupportedActions(): Long

hasValidMedia

open fun hasValidMedia(): Boolean

isMediaPlaying

open fun isMediaPlaying(): Boolean

next

open fun next(): Unit

pause

open fun pause(): Unit

play

open fun play(speed: Int): Unit

previous

open fun previous(): Unit