docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.html
Package com.google.android.exoplayer2.ext.mediasession
All Implemented Interfaces:MediaSessionConnector.CommandReceiver, MediaSessionConnector.QueueNavigator
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classTimelineQueueNavigatorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MediaSessionConnector.QueueNavigator](MediaSessionConnector.QueueNavigator.html "interface in com.google.android.exoplayer2.ext.mediasession")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
An abstract implementation of the MediaSessionConnector.QueueNavigator that maps the windows of a Player's Timeline to the media session queue.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | DEFAULT_MAX_QUEUE_SIZE |
Deprecated.
|
-
ACTIONS
Constructors | Constructor | Description |
| --- | --- |
| TimelineQueueNavigator(android.support.v4.media.session.MediaSessionCompat mediaSession) |
Deprecated.
Creates an instance for a given MediaSessionCompat.
|
| TimelineQueueNavigator(android.support.v4.media.session.MediaSessionCompat mediaSession, int maxQueueSize) |
Deprecated.
Creates an instance for a given MediaSessionCompat and maximum queue size.
|
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| long | getActiveQueueItemId(Player player) |
Deprecated.
Gets the id of the currently active queue item, or MediaSessionCompat.QueueItem.UNKNOWN_ID if the active item is unknown.
|
| abstract android.support.v4.media.MediaDescriptionCompat | getMediaDescription(Player player, int windowIndex) |
Deprecated.
Gets the MediaDescriptionCompat for a given timeline window index.
|
| long | getSupportedQueueNavigatorActions(Player player) |
Deprecated.
Returns the actions which are supported by the navigator.
|
| boolean | onCommand(Player player, String command, Bundle extras, ResultReceiver cb) |
Deprecated.
See MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver).
|
| void | onCurrentMediaItemIndexChanged(Player player) |
Deprecated.
Called when the current media item index changed.
|
| void | onSkipToNext(Player player) |
Deprecated.
See MediaSessionCompat.Callback.onSkipToNext().
|
| void | onSkipToPrevious(Player player) |
Deprecated.
See MediaSessionCompat.Callback.onSkipToPrevious().
|
| void | onSkipToQueueItem(Player player, long id) |
Deprecated.
See MediaSessionCompat.Callback.onSkipToQueueItem(long).
|
| void | onTimelineChanged(Player player) |
Deprecated.
Called when the timeline of the player has changed. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int DEFAULT_MAX_QUEUE_SIZE
Deprecated. See Also:Constant Field Values
-
public TimelineQueueNavigator(android.support.v4.media.session.MediaSessionCompat mediaSession)
Deprecated.
Creates an instance for a given MediaSessionCompat.
Equivalent to TimelineQueueNavigator(mediaSession, DEFAULT_MAX_QUEUE_SIZE).
Parameters:mediaSession - The MediaSessionCompat.
-
public TimelineQueueNavigator(android.support.v4.media.session.MediaSessionCompat mediaSession,
int maxQueueSize)
Deprecated.
Creates an instance for a given MediaSessionCompat and maximum queue size.
If the number of windows in the Player's Timeline exceeds maxQueueSize, the media session queue will correspond to maxQueueSize windows centered on the one currently being played.
Parameters:mediaSession - The MediaSessionCompat.maxQueueSize - The maximum queue size.
-
public abstract android.support.v4.media.MediaDescriptionCompat getMediaDescription([Player](../../Player.html "interface in com.google.android.exoplayer2")player,
int windowIndex)
Deprecated.
Gets the MediaDescriptionCompat for a given timeline window index.
Often artworks and icons need to be loaded asynchronously. In such a case, return a MediaDescriptionCompat without the images, load your images asynchronously off the main thread and then call MediaSessionConnector.invalidateMediaSessionQueue() to make the connector update the queue by calling this method again.
Parameters:player - The current player.windowIndex - The timeline window index for which to provide a description.Returns:A MediaDescriptionCompat.
-
public long getSupportedQueueNavigatorActions([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
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.
Specified by:getSupportedQueueNavigatorActions in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.Returns:The bitmask of the supported media actions.
-
public final void onTimelineChanged([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
Called when the timeline of the player has changed.
Specified by:onTimelineChanged in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.
-
public final void onCurrentMediaItemIndexChanged([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
Called when the current media item index changed.
Specified by:onCurrentMediaItemIndexChanged in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.
-
public final long getActiveQueueItemId(@Nullable[Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
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().
Specified by:getActiveQueueItemId in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.Returns:The id of the active queue item.
-
public void onSkipToPrevious([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
See MediaSessionCompat.Callback.onSkipToPrevious().
Specified by:onSkipToPrevious in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.
-
public void onSkipToQueueItem([Player](../../Player.html "interface in com.google.android.exoplayer2")player,
long id)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
See MediaSessionCompat.Callback.onSkipToQueueItem(long).
Specified by:onSkipToQueueItem in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.
-
public void onSkipToNext([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Deprecated.
Description copied from interface: MediaSessionConnector.QueueNavigator
See MediaSessionCompat.Callback.onSkipToNext().
Specified by:onSkipToNext in interface MediaSessionConnector.QueueNavigatorParameters:player - The player connected to the media session.
-
public boolean onCommand([Player](../../Player.html "interface in com.google.android.exoplayer2")player,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")command,
@Nullable[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")extras,
@Nullable[ResultReceiver](https://developer.android.com/reference/android/os/ResultReceiver.html "class or interface in android.os")cb)
Deprecated.
Description copied from interface: MediaSessionConnector.CommandReceiver
See MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver). The receiver may handle the command, but is not required to do so.
Specified by:onCommand in interface MediaSessionConnector.CommandReceiverParameters:player - The player connected to the media session.command - The command name.extras - Optional parameters for the command, may be null.cb - A result receiver to which a result may be sent by the command, may be null.Returns:Whether the receiver handled the command.