docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.QueueNavigator.html
Package com.google.android.exoplayer2.ext.mediasession
MediaSessionConnector.CommandReceiverAll Known Implementing Classes:TimelineQueueNavigatorEnclosing class:MediaSessionConnectorpublic static interfaceMediaSessionConnector.QueueNavigatorextends[MediaSessionConnector.CommandReceiver](MediaSessionConnector.CommandReceiver.html "interface in com.google.android.exoplayer2.ext.mediasession")
Handles queue navigation actions, and updates the media session queue by calling MediaSessionCompat.setQueue().
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static long | ACTIONS | |
All Methods Instance Methods Abstract Methods Default Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| long | getActiveQueueItemId(Player player) |
Gets the id of the currently active queue item, or MediaSessionCompat.QueueItem.UNKNOWN_ID if the active item is unknown.
|
| long | getSupportedQueueNavigatorActions(Player player) |
Returns the actions which are supported by the navigator.
|
| default void | onCurrentMediaItemIndexChanged(Player player) |
Called when the current media item index changed.
|
| void | onSkipToNext(Player player) |
See MediaSessionCompat.Callback.onSkipToNext().
|
| void | onSkipToPrevious(Player player) |
See MediaSessionCompat.Callback.onSkipToPrevious().
|
| void | onSkipToQueueItem(Player player, long id) |
See MediaSessionCompat.Callback.onSkipToQueueItem(long).
|
| void | onTimelineChanged(Player player) |
Called when the timeline of the player has changed.
|
-
onCommand
-
static final long ACTIONS
See Also:Constant Field Values
-
long getSupportedQueueNavigatorActions([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Returns the actions which are supported by the navigator. The supported actions must be a bitmask combined out of PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM, PlaybackStateCompat.ACTION_SKIP_TO_NEXT, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS.
Parameters:player - The player connected to the media session.Returns:The bitmask of the supported media actions.
-
void onTimelineChanged([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Called when the timeline of the player has changed.
Parameters:player - The player connected to the media session.
-
default void onCurrentMediaItemIndexChanged([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Called when the current media item index changed.
Parameters:player - The player connected to the media session.
-
long getActiveQueueItemId(@Nullable[Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Gets the id of the currently active queue item, or 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().
Parameters:player - The player connected to the media session.Returns:The id of the active queue item.
-
void onSkipToPrevious([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
See MediaSessionCompat.Callback.onSkipToPrevious().
Parameters:player - The player connected to the media session.
-
void onSkipToQueueItem([Player](../../Player.html "interface in com.google.android.exoplayer2")player,
long id)
See MediaSessionCompat.Callback.onSkipToQueueItem(long).
Parameters:player - The player connected to the media session.
-
void onSkipToNext([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
See MediaSessionCompat.Callback.onSkipToNext().
Parameters:player - The player connected to the media session.