A request to reorder a list of media items in the queue.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["`chrome.cast.media.QueueReorderItemsRequest` is used to change the playback order of media items within a queue on a cast receiver."],["It requires a list of media item IDs (`itemIds`) to reorder and optionally an `insertBefore` item ID to specify the position in the queue."],["Items not specified in the `itemIds` array retain their original order relative to each other, with the reordered items inserted as a block."],["The reordered items are placed before the item specified by `insertBefore`, or appended to the end of the queue if `insertBefore` is not provided or is invalid."],["Custom data can be passed to the receiver application using the `customData` property."]]],["The `QueueReorderItemsRequest` class is used to rearrange media items within a queue. It requires an array of `itemIds` to specify the items and their new order. The `insertBefore` property determines where to place the reordered list; if null, it's appended to the end. Items not listed retain their positions, while non-existent items are ignored. Custom data for the receiver can be set. The reordered list will be in the position as specified in the `insertBefore` property.\n"]]