MediaControllerGlue
abstract classMediaControllerGlue: 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 |
|
---|---|
Constructor for the glue. |
Public methods |
|
---|---|
open Unit |
attachToMediaController(mediaController: MediaControllerCompat!) Attaches to the given media controller. |
open Unit |
detach() 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 |
next() |
open Unit |
pause() |
open Unit | |
open Unit |
previous() |
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
previous
open fun previous(): Unit