AI-generated Key Takeaways
-
QueueRemoveRequestData
is a class used for sending requests to remove items from a media queue in the Cast framework. -
It allows specifying the
itemIds
to be removed and optional parameters likecurrentItemId
,currentTime
, andcustomData
. -
QueueRemoveRequestData
inherits properties fromcast.framework.messages.RequestData
such asmediaSessionId
,requestId
, andsequenceNumber
for request management. -
The request data includes an array of
itemIds
representing the queue items to delete, enabling the receiver to process the removal. -
Developers can leverage
currentItemId
andcurrentTime
to control playback behavior after the deletion, ensuring a smooth transition in the media queue.
cast.framework.messages. QueueRemoveRequestData
Media event queue REMOVE request data.
Constructor
QueueRemoveRequestData
new QueueRemoveRequestData(itemIds)
Parameter |
|
---|---|
itemIds |
Array of number The IDs of the items to reorder. Value must not be null. |
Properties
currentItemId
(number or undefined)
ID of the current media Item after the deletion (if not provided, the currentItem value will be the same as before the deletion; if it does not exist because it has been deleted, the currentItem will point to the next logical item in the list).
currentTime
(number or undefined)
Seconds since the beginning of content to start playback of the current item. If provided, this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep).
customData
(non-null Object or undefined)
Application-specific data for this request. It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages.
- Inherited from
- cast.framework.messages.RequestData#customData
itemIds
non-null Array of number
IDs of queue items to be deleted.
mediaSessionId
(number or undefined)
Id of the media session that the request applies to.
- Inherited from
- cast.framework.messages.RequestData#mediaSessionId
requestId
number
Id of the request, used to correlate request/response.
- Inherited from
- cast.framework.messages.RequestData#requestId
sequenceNumber
(number or undefined)
A number to synchronize all queue commands. If provided for a queue command, the SDK will verify the queue latest sequence number match the request. Current sequenceNumber is provided as part of outgoing queue changed messages.
- Inherited from
- cast.framework.messages.RequestData#sequenceNumber