AI-generated Key Takeaways
-
The QueueInsertItemsRequest class is used to insert a list of new media items into a queue.
-
The constructor requires an array of non-null chrome.cast.media.QueueItem objects representing the items to insert.
-
The request can include custom data for the receiver application and an optional item ID to insert the new items before in the queue.
-
The
items
property holds the list of queue items to insert, and their itemId fields should be empty for the request to succeed.
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).