Data structure for queue reorder command requests.
Inherited Constant Summary
Public Method Summary
Integer |
getCurrentItemId()
ID of the current media item after the reorder (if
null , the
currentItem value will be the same as before the reorder).
|
Long |
getCurrentTime()
Milliseconds since the beginning of content to start playback of the current
item.
|
JSONObject |
getCustomData()
Returns the custom data.
|
Integer |
getInsertBefore()
ID of the item that will be located immediately after the reordered list.
|
List<Integer> |
getItemIds()
IDs of the items to be reordered, in the new order.
|
void |
writeToParcel(Parcel out, int
flags)
|
Inherited Method Summary
Public Methods
public Integer getCurrentItemId ()
ID of the current media item after the reorder (if null
, the
currentItem value will be the same as before the reorder).
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 Integer getInsertBefore ()
ID of the item that will be located immediately after the reordered list. If the ID
is not found or it is null
, the reordered list will be appended at the end
of the existing list.
public List<Integer> getItemIds ()
IDs of the items to be reordered, in the new order. Items not provided should keep
their existing order. The provided list should be inserted at the position determined
by
getInsertBefore()
. For example:
- If insertBefore is not specified
- Existing queue: "A","D","G","H","B","E"
- Item IDs: "D","H","B"
- New Order: "A","G","E","D","H","B"
- If insertBefore is "A"
- Existing queue: "A","D","G","H","B"
- Item IDs: "D","H","B"
- New Order: "D","H","B","A","G","E"
- If insertBefore is "G"
- Existing queue: "A","D","G","H","B"
- Item IDs: "D","H","B"
- New Order: "A","D","H","B","G","E"