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

open Int

open Unit
play(speed: Int)

open Unit

Detaches from the media controller.

open Long

open Int

open CharSequence!

open CharSequence!

open Drawable!

MediaControllerCompat!

Returns the media controller currently attached.

open Boolean

open Int

open Unit

open Unit

open Unit

Attaches to the given media controller.

open Boolean

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

previous

open fun previous(): Unit

getCurrentPosition

open fun getCurrentPosition(): Int

play

open fun play(speed: Int): Unit

detach

open fun detach(): Unit

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

getSupportedActions

open fun getSupportedActions(): Long

getMediaDuration

open fun getMediaDuration(): Int

getMediaTitle

open fun getMediaTitle(): CharSequence!

getMediaSubtitle

open fun getMediaSubtitle(): CharSequence!

getMediaArt

open fun getMediaArt(): Drawable!

getMediaController

fun getMediaController(): MediaControllerCompat!

Returns the media controller currently attached.

hasValidMedia

open fun hasValidMedia(): Boolean

getCurrentSpeedId

open fun getCurrentSpeedId(): Int

next

open fun next(): Unit

pause

open fun pause(): Unit

attachToMediaController

open fun attachToMediaController(mediaController: MediaControllerCompat!): Unit

Attaches to the given media controller.

isMediaPlaying

open fun isMediaPlaying(): Boolean