AI-generated Key Takeaways
-
chrome.cast.media.QueueInsertItemsRequest
is used to insert new media items into an existing queue on a cast receiver. -
It requires a list of
chrome.cast.media.QueueItem
objects, which represent the media to be added, and these items should not have pre-assigned IDs. -
You can optionally specify an existing item ID (
insertBefore
) to insert the new items before that item, otherwise, they are appended to the end. -
The request can also include custom data for the receiver application.
chrome.cast.media. QueueInsertItemsRequest
A request to insert a list of new media items into the queue.
Constructor
QueueInsertItemsRequest
new QueueInsertItemsRequest(itemsToInsert)
Parameter |
|
---|---|
itemsToInsert |
Array of non-null chrome.cast.media.QueueItem The list of media items to insert. Must not be null or empty. The itemId of each item must not be set (as they will be assigned by the receiver). 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 inserted list. If null or not found the list will be appended to the end of the queue.
items
non-null Array of non-null chrome.cast.media.QueueItem
List of queue items to insert. The itemId field of the items should be empty or the request will fail with an INVALID_PARAMS error. It is sorted (first element will be played first).