public static interface MediaSessionConnector.QueueNavigator extends MediaSessionConnector.CommandReceiver
MediaSessionCompat.setQueue().| Modifier and Type | Field and Description |
|---|---|
static long |
ACTIONS |
| Modifier and Type | Method and Description |
|---|---|
long |
getActiveQueueItemId(com.google.android.exoplayer2.Player player)
Gets the id of the currently active queue item, or
MediaSessionCompat.QueueItem#UNKNOWN_ID if the active item is unknown. |
long |
getSupportedQueueNavigatorActions(com.google.android.exoplayer2.Player player)
Returns the actions which are supported by the navigator.
|
void |
onCurrentWindowIndexChanged(com.google.android.exoplayer2.Player player)
Called when the current window index changed.
|
void |
onSkipToNext(com.google.android.exoplayer2.Player player)
See
MediaSessionCompat.Callback#onSkipToNext(). |
void |
onSkipToPrevious(com.google.android.exoplayer2.Player player)
See
MediaSessionCompat.Callback#onSkipToPrevious(). |
void |
onSkipToQueueItem(com.google.android.exoplayer2.Player player,
long id)
See
MediaSessionCompat.Callback#onSkipToQueueItem(long). |
void |
onTimelineChanged(com.google.android.exoplayer2.Player player)
Called when the timeline of the player has changed.
|
getCommands, onCommandstatic final long ACTIONS
long getSupportedQueueNavigatorActions(@Nullable
com.google.android.exoplayer2.Player player)
PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM, PlaybackStateCompat.ACTION_SKIP_TO_NEXT, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS.player - The Player.void onTimelineChanged(com.google.android.exoplayer2.Player player)
player - The player of which the timeline has changed.void onCurrentWindowIndexChanged(com.google.android.exoplayer2.Player player)
player - The player of which the current window index of the timeline has changed.long getActiveQueueItemId(@Nullable
com.google.android.exoplayer2.Player player)
MediaSessionCompat.QueueItem#UNKNOWN_ID if the active item is unknown.
To let the connector publish metadata for the active queue item, the queue item with the
returned id must be available in the list of items returned by MediaControllerCompat.getQueue().
player - The player connected to the media session.void onSkipToPrevious(com.google.android.exoplayer2.Player player)
MediaSessionCompat.Callback#onSkipToPrevious().void onSkipToQueueItem(com.google.android.exoplayer2.Player player,
long id)
MediaSessionCompat.Callback#onSkipToQueueItem(long).void onSkipToNext(com.google.android.exoplayer2.Player player)
MediaSessionCompat.Callback#onSkipToNext().