Yêu cầu sắp xếp lại danh sách mục nội dung đa phương tiện trong hàng đợi.
Hàm dựng
QueueReorderItemsRequest
mới
QueueArrangeItemsRequest(itemIdsToReorder)
Thông số
itemIdsToReorder
Mảng số
Danh sách mã mục nội dung đa phương tiện cần sắp xếp lại. Không được để trống hoặc không có giá trị rỗng.
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ặt hàng sẽ được đặt ngay sau danh sách được sắp xếp lại.
Nếu giá trị rỗng hoặc không tìm thấy, danh sách được sắp xếp lại sẽ được thêm vào cuối
hàng đợi. Mã này không được là một trong các mã nhận dạng trong danh sách itemIds.
itemIds
mảng số không rỗng
Danh sách mã mục nội dung nghe nhìn cần sắp xếp lại theo thứ tự mới. Các mặt hàng không được cung cấp sẽ được giữ lại đơn đặt hàng hiện có (mà không cần đặt hàng lại các mặt hàng đó). Danh sách đã cung cấp sẽ được chèn vào vị trí do insertBefore xác định.
Ví dụ:
Nếu không chỉ định insertbefore
Hàng đợi hiện có: “A”,”D”,”G”,”H”,”B”,”E”
itemIds: “D”,”H”,”B”
Đơn đặt hàng mới: “A”,”G”,”E”,“D”,”H”,”B”
Nếu insertTrước là "A"
Hàng đợi hiện có: “A”,”D”,”G”,”H”,”B”
itemIds: “D”,”H”,”B”
Đơn đặt hàng mới: “D”,”H”,”B”,“A”,”G”,”E”
Nếu insertTrước là "G"
Hàng đợi hiện có: “A”,”D”,”G”,”H”,”B”
itemIds: “D”,”H”,”B”
Đơn đặt hàng mới: “A”,“D”,”H”,”B”,”G”,”E”
Nếu không có mục nào tồn tại thì mục đó sẽ bị bỏ qua.
Không được để trống hoặc không có giá trị rỗng.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2023-12-02 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"]]