Class: QueueReorderItemsRequest

  • QueueReorderItemsRequest is a request to reorder a list of media items in a queue.

  • The constructor requires an array of numbers representing the IDs of the items to reorder.

  • The customData property allows for custom data to be sent to the receiver application.

  • The insertBefore property specifies the ID of the item that the reordered list will be inserted before, or if null, the list is appended to the end.

  • The itemIds property is a non-null array of numbers representing the IDs of the media items to reorder in their new desired order.

Constructor

QueueReorderItemsRequest

new QueueReorderItemsRequest(itemIdsToReorder)

Parameter

itemIdsToReorder

Array of number

The list of media item IDs to reorder. Must not be null or empty.

Value must not be null.

Properties

customData

nullable Object

Custom data for the receiver application.

insertBefore

nullable number

ID of the item that will be located immediately after the reordered list. If null or not found, the reordered list will be appended at the end of the queue. This ID can not be one of the IDs in the itemIds list.

itemIds

non-null Array of number

The list of media item IDs to reorder, in the new order. Items not provided will keep their existing order (without the items being reordered). The provided list will be inserted at the position determined by insertBefore.

For example:

If insertBefore is not specified Existing queue: “A”,”D”,”G”,”H”,”B”,”E” itemIds: “D”,”H”,”B” New Order: “A”,”G”,”E”,“D”,”H”,”B”

If insertBefore is “A” Existing queue: “A”,”D”,”G”,”H”,”B” itemIds: “D”,”H”,”B” New Order: “D”,”H”,”B”,“A”,”G”,”E”

If insertBefore is “G” Existing queue: “A”,”D”,”G”,”H”,”B” itemIds: “D”,”H”,”B” New Order: “A”,“D”,”H”,”B”,”G”,”E”

If any of the items does not exist it will be ignored. Must not be null or empty.