MediaControllerAdapter

public class MediaControllerAdapter
extends PlayerAdapter

java.lang.Object
   ↳ androidx.leanback.media.PlayerAdapter
     ↳ androidx.leanback.media.MediaControllerAdapter


A helper class for implementing a adapter layer for MediaControllerCompat.

Summary

Public constructors

MediaControllerAdapter(MediaControllerCompat controller)

Constructor for the adapter using MediaControllerCompat.

Public methods

void fastForward()

Optional method.

long getBufferedPosition()

Returns the current buffered position of the media item in milliseconds.

long getCurrentPosition()

Returns the current position of the media item in milliseconds.

long getDuration()

Returns the duration of the media item in milliseconds.

Drawable getMediaArt(Context context)

Get current media's drawable art.

MediaControllerCompat getMediaController()

Return the object of MediaControllerCompat from this class.

CharSequence getMediaSubtitle()

Get current media's subtitle.

CharSequence getMediaTitle()

Get current media's title.

long getSupportedActions()

Return xor combination of values defined in PlaybackBaseControlGlue.

boolean isPlaying()

Returns true if media is currently playing.

void next()

Optional method.

void onAttachedToHost(PlaybackGlueHost host)

This method is called attached to associated PlaybackGlueHost.

void