QueueUpdateRequestData

public class QueueUpdateRequestData extends Object
implements Parcelable RequestData

Data structure for queue update command requests.

Inherited Constant Summary

Public Method Summary

Integer
getCurrentItemId()
ID of the current media item after the changes.
Long
getCurrentTime()
Milliseconds since the beginning of content to start playback of the current item.
JSONObject
getCustomData()
Returns the custom data.
List<MediaQueueItem>
getItems()
List of queue items to be updated.
Integer
getJump()
Skip/Go back jump number of items with respect to the position of current item (it can be negative).
Integer
getRepeatMode()
Behavior of the queue when all items have been played.
Boolean
getShuffle()
Shuffle the queue items when the update is processed.
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Public Methods

public Integer getCurrentItemId ()

ID of the current media item after the changes.

if null or an item with this ID is not found, the current item will be the same as before the update.

public Long getCurrentTime ()

Milliseconds since the beginning of content to start playback of the current item.

If not null, this value should take precedence over the MediaQueueItem.getStartTime() value provided at the MediaQueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the current time does not apply to the item permanently like the MediaQueueItem.getStartTime(). It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep).

public JSONObject getCustomData ()

Returns the custom data.

public List<MediaQueueItem> getItems ()

List of queue items to be updated. No reordering should happen, the items should retain the existing order.

This may return null if the request doesn't require to update queue items.

public Integer getJump ()

Skip/Go back jump number of items with respect to the position of current item (it can be negative).

If it is out of boundaries, the current item should be the next logical item in the queue wrapping around the boundaries. The new current item position should follow the rules of the queue repeat behavior.

This may return null if the request doesn't require to jump forward/backward.

public Integer getRepeatMode ()

Behavior of the queue when all items have been played.

This may return null if the request doesn't require to change the repeat mode.

public Boolean getShuffle ()

Shuffle the queue items when the update is processed. After the queue items are shuffled, the item at the current item position should be loaded.

  • If true, the queue items should be shuffled.
  • If false, the queue items should be unshuffled.
  • If null, the shuffle state should not change.

public void writeToParcel (Parcel out, int flags)