Back to Exoplayer

TimelineQueueEditor.QueueDataAdapter (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/TimelineQueueEditor.QueueDataAdapter.html

latest1.8 KB
Original Source

Package com.google.android.exoplayer2.ext.mediasession

Interface TimelineQueueEditor.QueueDataAdapter


public static interfaceTimelineQueueEditor.QueueDataAdapter

Adapter to get MediaDescriptionCompat of items in the queue and to notify the application about changes in the queue to sync the data structure backing the MediaSessionConnector.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | add​(int position, android.support.v4.media.MediaDescriptionCompat description) | Adds a MediaDescriptionCompat at the given position. | | void | move​(int from, int to) | Moves a queue item from position from to position to. | | void | remove​(int position) | Removes the item at the given position. |

Method Detail

- 

add

void add​(int position,
         android.support.v4.media.MediaDescriptionCompat description)

Adds a MediaDescriptionCompat at the given position. Parameters:position - The position at which to add.description - The MediaDescriptionCompat to be added.

- 

remove

void remove​(int position)

Removes the item at the given position. Parameters:position - The position at which to remove the item.

- 

move

void move​(int from,
          int to)

Moves a queue item from position from to position to. Parameters:from - The position from which to remove the item.to - The target position to which to move the item.