Danh sách các mục nội dung đa phương tiện cần chèn. Không được để trống hoặc không có giá trị rỗng. Không được đặt mã mặt hàng của từng mục (vì người nhận sẽ gán mã mặt hàng này).
Giá trị không được rỗng.
Thuộc tính
customData
Đối tượng rỗng
Dữ liệu tuỳ chỉnh cho ứng dụng nhận.
insertBefore
số rỗng
Mã của mục sẽ nằm ngay sau danh sách được chèn.
Nếu giá trị rỗng hoặc không tìm thấy, danh sách này sẽ được thêm vào cuối hàng đợi.
Danh sách các mục trong hàng đợi cần chèn. Trường itemId của các mặt hàng phải trống, nếu không yêu cầu sẽ không thành công do lỗi INVALID_PARAMS. Thẻ này được sắp xếp (phần tử đầu tiên sẽ được phát trước).
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.QueueInsertItemsRequest\u003c/code\u003e is used to insert new media items into an existing queue on a cast receiver.\u003c/p\u003e\n"],["\u003cp\u003eIt requires a list of \u003ccode\u003echrome.cast.media.QueueItem\u003c/code\u003e objects, which represent the media to be added, and these items should not have pre-assigned IDs.\u003c/p\u003e\n"],["\u003cp\u003eYou can optionally specify an existing item ID (\u003ccode\u003einsertBefore\u003c/code\u003e) to insert the new items before that item, otherwise, they are appended to the end.\u003c/p\u003e\n"],["\u003cp\u003eThe request can also include custom data for the receiver application.\u003c/p\u003e\n"]]],[],null,["# Class: QueueInsertItemsRequest\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).QueueInsertItemsRequest\n=============================================================================================================================================\n\nclass static\n\nA request to insert a list of new media items into the queue.\n\nConstructor\n-----------\n\n### QueueInsertItemsRequest\n\nnew\nQueueInsertItemsRequest(itemsToInsert)\n\n| #### Parameter ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| itemsToInsert | Array of non-null [chrome.cast.media.QueueItem](/cast/docs/reference/web_sender/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. |\n\nProperties\n----------\n\n### customData\n\nnullable Object\n\nCustom data for the receiver application.\n\n### insertBefore\n\nnullable number\n\nID of the item that will be located immediately after the inserted list.\nIf null or not found the list will be appended to the end of the queue.\n\n### items\n\nnon-null Array of non-null [chrome.cast.media.QueueItem](/cast/docs/reference/web_sender/chrome.cast.media.QueueItem)\n\nList of queue items to insert. The itemId field of the items should be\nempty or the request will fail with an INVALID_PARAMS error. It is sorted\n(first element will be played first)."]]