Mã nhận dạng của Mục nội dung đa phương tiện hiện tại sau khi thay đổi (nếu không được cung cấp hoặc không tìm thấy, giá trị currentItem sẽ giống như trước khi cập nhật).
currentTime
(số hoặc không xác định)
Số giây kể từ khi bắt đầu nội dung để bắt đầu phát mục hiện tại. Nếu được cung cấp, giá trị này sẽ được ưu tiên hơn giá trị startTime được cung cấp ở cấp ShowcaseItem nhưng chỉ trong lần đầu tiên phát mục đó. Đây là cách để xử lý trường hợp phổ biến khi người dùng chuyển đến giữa một mục để currentTime không áp dụng vĩnh viễn cho mục như Hàng đợi startTime. Thao tác này giúp tránh phải đặt lại thời gian bắt đầu một cách linh động (điều này có thể không thực hiện được nếu điện thoại đã chuyển sang chế độ ngủ).
customData
(Đối tượng không rỗng hoặc không xác định)
Dữ liệu dành riêng cho ứng dụng của yêu cầu này. Phương thức này giúp người gửi và người nhận dễ dàng mở rộng giao thức truyền thông mà không phải sử dụng không gian tên mới với các thông báo tuỳ chỉnh.
Danh sách các mục trong hàng đợi cần cập nhật. Quá trình đặt lại đơn hàng sẽ không diễn ra, các mặt hàng
sẽ giữ nguyên đơn đặt hàng hiện tại.
jump
(số hoặc không xác định)
Bỏ qua/Quay lại số lượng mục tương ứng với vị trí của currentItem (có thể là số âm). Nếu nằm ngoài ranh giới, currentItem sẽ là mục logic tiếp theo trong hàng đợi gói xung quanh ranh giới. Vị trí currentItem mới sẽ tuân theo các quy tắc của hành vi lặp lại trong hàng đợi.
mediaSessionId
(số hoặc không xác định)
Mã của phiên phát nội dung đa phương tiện mà yêu cầu áp dụng.
Một số để đồng bộ hoá tất cả các lệnh trong hàng đợi.
Nếu được cung cấp cho một lệnh trong hàng đợi, SDK sẽ xác minh số thứ tự mới nhất của hàng đợi khớp với yêu cầu.
Hiện tạiseqNumber được cung cấp như một phần của các thông báo đã thay đổi trong hàng đợi gửi đi.
Phát ngẫu nhiên các mục trong hàng đợi khi bản cập nhật được xử lý. Sau khi các mục trong hàng đợi được xáo trộn, mục ở vị trí currentItem sẽ được tải.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eQueueUpdateRequestData\u003c/code\u003e is used to send requests for updating the media queue, such as changing the current item, playback time, or reordering items.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for specifying the desired changes, like \u003ccode\u003ecurrentItemId\u003c/code\u003e, \u003ccode\u003ecurrentTime\u003c/code\u003e, \u003ccode\u003eitems\u003c/code\u003e, \u003ccode\u003erepeatMode\u003c/code\u003e, and \u003ccode\u003eshuffle\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecustomData\u003c/code\u003e enables the sender and receiver to exchange application-specific information alongside the queue update request.\u003c/p\u003e\n"],["\u003cp\u003eThe request also includes properties for identification and synchronization, like \u003ccode\u003erequestId\u003c/code\u003e, \u003ccode\u003emediaSessionId\u003c/code\u003e, and \u003ccode\u003esequenceNumber\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this data structure to build robust media playback experiences with features like queue management, playback control, and custom application logic.\u003c/p\u003e\n"]]],["`QueueUpdateRequestData` manages updates to a media queue. Key actions include defining the `currentItemId`, adjusting `currentTime` for playback start, and using `customData` for extending the protocol. It allows updating `items` while retaining their order and setting the `repeatMode`. Additionally, it manages jumping/skipping with the `jump`, and shuffling the `items` with the option shuffle. It uses `requestId`, `mediaSessionId`, and `sequenceNumber` for synchronization.\n"],null,["# Class: QueueUpdateRequestData\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).QueueUpdateRequestData\n===============================================================================================================================================================\n\nclass static\n\nMedia event UPDATE queue request data.\n\nConstructor\n-----------\n\n### QueueUpdateRequestData\n\nnew\nQueueUpdateRequestData()\n\nExtends\n: [cast.framework.messages.RequestData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData)\n\nProperties\n----------\n\n### currentItemId\n\n(number or undefined)\n\nID of the current media Item after the changes (if not provided or not\nfound, the currentItem value will be the same as before the update).\n\n### currentTime\n\n(number or undefined)\n\nSeconds since the beginning of content to start playback of the current\nitem. If provided, this value will take precedence over the startTime\nvalue provided at the QueueItem level but only the first time the item is\nplayed. This is to cover the common case where the user jumps to the\nmiddle of an item so the currentTime does not apply to the item\npermanently like the QueueItem startTime does. It avoids having to reset\nthe startTime dynamically (that may not be possible if the phone has gone\nto sleep).\n\n### customData\n\n(non-null Object or undefined)\n\nApplication-specific data for this request. It enables the sender and\nreceiver to easily extend the media protocol without having to use a new\nnamespace with custom messages.\n\nInherited from\n: [cast.framework.messages.RequestData#customData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#customData)\n\n### items\n\n(non-null Array of non-null [cast.framework.messages.QueueItem](/cast/docs/reference/web_receiver/cast.framework.messages.QueueItem) or undefined)\n\nList of queue items to be updated. No reordering will happen, the items\nwill retain the existing order.\n\n### jump\n\n(number or undefined)\n\nSkip/Go back number of items with respect to the position of currentItem (it can be negative). If it is out of boundaries, the currentItem will be the next logical item in the queue wrapping around the boundaries. The new currentItem position will follow the rules of the queue repeat behavior.\n\n### mediaSessionId\n\n(number or undefined)\n\nId of the media session that the request applies to.\n\nInherited from\n: [cast.framework.messages.RequestData#mediaSessionId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#mediaSessionId)\n\n### repeatMode\n\n(non-null [cast.framework.messages.RepeatMode](/cast/docs/reference/web_receiver/cast.framework.messages#.RepeatMode) or undefined)\n\nBehavior of the queue when all items have been played.\n\n### requestId\n\nnumber\n\nId of the request, used to correlate request/response.\n\nInherited from\n: [cast.framework.messages.RequestData#requestId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#requestId)\n\n### sequenceNumber\n\n(number or undefined)\n\nA number to synchronize all queue commands.\nIf provided for a queue command, the SDK will verify the queue latest\nsequence number match the request.\nCurrent sequenceNumber is provided as part of outgoing queue changed\nmessages.\n\nInherited from\n: [cast.framework.messages.RequestData#sequenceNumber](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#sequenceNumber)\n\n### shuffle\n\n(boolean or undefined)\n\nShuffle the queue items when the update is processed. After the queue\nitems are shuffled, the item at the currentItem position will be loaded."]]