Class TimelineQueueEditor
- java.lang.Object
-
- com.google.android.exoplayer2.ext.mediasession.TimelineQueueEditor
-
- All Implemented Interfaces:
MediaSessionConnector.CommandReceiver
,MediaSessionConnector.QueueEditor
@Deprecated public final class TimelineQueueEditor extends Object implements MediaSessionConnector.QueueEditor, MediaSessionConnector.CommandReceiver
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.AMediaSessionConnector.QueueEditor
implementation.This class implements the
MediaSessionConnector.CommandReceiver
interface and handles theCOMMAND_MOVE_QUEUE_ITEM
to move a queue item instead of removing and inserting it. This allows to move the currently playing window without interrupting playback.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TimelineQueueEditor.MediaDescriptionConverter
Deprecated.Converts aMediaDescriptionCompat
to aMediaItem
.static class
TimelineQueueEditor.MediaIdEqualityChecker
Deprecated.Media description comparator comparing the media IDs.static interface
TimelineQueueEditor.QueueDataAdapter
Deprecated.Adapter to getMediaDescriptionCompat
of items in the queue and to notify the application about changes in the queue to sync the data structure backing theMediaSessionConnector
.
-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_MOVE_QUEUE_ITEM
Deprecated.static String
EXTRA_FROM_INDEX
Deprecated.static String
EXTRA_TO_INDEX
Deprecated.
-
Constructor Summary
Constructors Constructor Description TimelineQueueEditor(android.support.v4.media.session.MediaControllerCompat mediaController, TimelineQueueEditor.QueueDataAdapter queueDataAdapter, TimelineQueueEditor.MediaDescriptionConverter mediaDescriptionConverter)
Deprecated.Creates a newTimelineQueueEditor
with a given mediaSourceFactory.TimelineQueueEditor(android.support.v4.media.session.MediaControllerCompat mediaController, TimelineQueueEditor.QueueDataAdapter queueDataAdapter, TimelineQueueEditor.MediaDescriptionConverter mediaDescriptionConverter, com.google.android.exoplayer2.ext.mediasession.TimelineQueueEditor.MediaDescriptionEqualityChecker equalityChecker)
Deprecated.Creates a newTimelineQueueEditor
with a given mediaSourceFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
onAddQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description)
Deprecated.SeeMediaSessionCompat.Callback.onAddQueueItem(MediaDescriptionCompat description)
.void
onAddQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description, int index)
Deprecated.SeeMediaSessionCompat.Callback.onAddQueueItem(MediaDescriptionCompat description, int index)
.boolean
onCommand(Player player, String command, Bundle extras, ResultReceiver cb)
Deprecated.SeeMediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver)
.void
onRemoveQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description)
Deprecated.SeeMediaSessionCompat.Callback.onRemoveQueueItem(MediaDescriptionCompat description)
.
-
-
-
Field Detail
-
COMMAND_MOVE_QUEUE_ITEM
public static final String COMMAND_MOVE_QUEUE_ITEM
Deprecated.- See Also:
- Constant Field Values
-
EXTRA_FROM_INDEX
public static final String EXTRA_FROM_INDEX
Deprecated.- See Also:
- Constant Field Values
-
EXTRA_TO_INDEX
public static final String EXTRA_TO_INDEX
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TimelineQueueEditor
public TimelineQueueEditor(android.support.v4.media.session.MediaControllerCompat mediaController, TimelineQueueEditor.QueueDataAdapter queueDataAdapter, TimelineQueueEditor.MediaDescriptionConverter mediaDescriptionConverter)
Deprecated.Creates a newTimelineQueueEditor
with a given mediaSourceFactory.- Parameters:
mediaController
- AMediaControllerCompat
to read the current queue.queueDataAdapter
- ATimelineQueueEditor.QueueDataAdapter
to change the backing data.mediaDescriptionConverter
- TheTimelineQueueEditor.MediaDescriptionConverter
for converting media descriptions toMediaItems
.
-
TimelineQueueEditor
public TimelineQueueEditor(android.support.v4.media.session.MediaControllerCompat mediaController, TimelineQueueEditor.QueueDataAdapter queueDataAdapter, TimelineQueueEditor.MediaDescriptionConverter mediaDescriptionConverter, com.google.android.exoplayer2.ext.mediasession.TimelineQueueEditor.MediaDescriptionEqualityChecker equalityChecker)
Deprecated.Creates a newTimelineQueueEditor
with a given mediaSourceFactory.- Parameters:
mediaController
- AMediaControllerCompat
to read the current queue.queueDataAdapter
- ATimelineQueueEditor.QueueDataAdapter
to change the backing data.mediaDescriptionConverter
- TheTimelineQueueEditor.MediaDescriptionConverter
for converting media descriptions toMediaItems
.equalityChecker
- TheTimelineQueueEditor.MediaDescriptionEqualityChecker
to match queue items.
-
-
Method Detail
-
onAddQueueItem
public void onAddQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description)
Deprecated.Description copied from interface:MediaSessionConnector.QueueEditor
SeeMediaSessionCompat.Callback.onAddQueueItem(MediaDescriptionCompat description)
.- Specified by:
onAddQueueItem
in interfaceMediaSessionConnector.QueueEditor
-
onAddQueueItem
public void onAddQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description, int index)
Deprecated.Description copied from interface:MediaSessionConnector.QueueEditor
SeeMediaSessionCompat.Callback.onAddQueueItem(MediaDescriptionCompat description, int index)
.- Specified by:
onAddQueueItem
in interfaceMediaSessionConnector.QueueEditor
-
onRemoveQueueItem
public void onRemoveQueueItem(Player player, android.support.v4.media.MediaDescriptionCompat description)
Deprecated.Description copied from interface:MediaSessionConnector.QueueEditor
SeeMediaSessionCompat.Callback.onRemoveQueueItem(MediaDescriptionCompat description)
.- Specified by:
onRemoveQueueItem
in interfaceMediaSessionConnector.QueueEditor
-
onCommand
public boolean onCommand(Player player, String command, @Nullable Bundle extras, @Nullable ResultReceiver cb)
Deprecated.Description copied from interface:MediaSessionConnector.CommandReceiver
SeeMediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver)
. The receiver may handle the command, but is not required to do so.- Specified by:
onCommand
in interfaceMediaSessionConnector.CommandReceiver
- Parameters:
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.
-
-