MediaControllerAdapter

open class MediaControllerAdapter : PlayerAdapter
kotlin.Any
   ↳ androidx.leanback.media.PlayerAdapter
   ↳ androidx.leanback.media.MediaControllerAdapter

A helper class for implementing a adapter layer for MediaControllerCompat.

Summary

Public constructors
<init>(controller: MediaControllerCompat!)

Constructor for the adapter using MediaControllerCompat.

Public methods
open Long

open Unit

open Unit
seekTo(positionInMs: Long)

open Long

open Unit

open Unit

open Unit

open Unit

open Boolean

open Long

open Unit

open CharSequence!

Get current media's title.

open Unit

open Unit

open CharSequence!

Get current media's subtitle.

open Unit
setRepeatAction(repeatActionIndex: Int)

open Drawable!
getMediaArt(context: Context!)

Get current media's drawable art.

open Unit
setShuffleAction(shuffleActionIndex: Int)

open Long

open MediaControllerCompat!

Return the object of MediaControllerCompat from this class.

open Unit

Inherited functions

Public constructors

<init>

MediaControllerAdapter(controller: MediaControllerCompat!)

Constructor for the adapter using MediaControllerCompat.

Parameters
controller MediaControllerCompat!: Object of MediaControllerCompat..

Public methods

getDuration

open fun getDuration(): Long

previous

open fun previous(): Unit

seekTo

open fun seekTo(positionInMs: Long): Unit

getCurrentPosition

open fun getCurrentPosition(): Long

fastForward

open fun fastForward(): Unit

setProgressUpdatingEnabled

open fun setProgressUpdatingEnabled(enabled: Boolean): Unit

play

open fun play(): Unit

next

open fun next(): Unit

isPlaying

open fun isPlaying(): Boolean

getSupportedActions

open fun getSupportedActions(): Long

pause

open fun pause(): Unit

getMediaTitle

open fun getMediaTitle(): CharSequence!

Get current media's title.

Return
CharSequence!: Title of current media.

onAttachedToHost

open fun onAttachedToHost(host: PlaybackGlueHost!): Unit

onDetachedFromHost

open fun onDetachedFromHost(): Unit

getMediaSubtitle

open fun getMediaSubtitle(): CharSequence!

Get current media's subtitle.

Return
CharSequence!: Subtitle of current media.

setRepeatAction

open fun setRepeatAction(repeatActionIndex: Int): Unit

getMediaArt

open fun getMediaArt(context: Context!): Drawable!

Get current media's drawable art.

Return
Drawable!: Drawable art of current media.

setShuffleAction

open fun setShuffleAction(shuffleActionIndex: Int): Unit

getBufferedPosition

open fun getBufferedPosition(): Long

getMediaController

open fun getMediaController(): MediaControllerCompat!

Return the object of MediaControllerCompat from this class.

Return
MediaControllerCompat!: Media Controller Compat object owned by this class.

rewind

open fun rewind(): Unit