Class: QueueLoadRequestData

Stay organized with collections Save and categorize content based on your preferences.



new QueueLoadRequestData(items)



Array of non-null cast.framework.messages.QueueItem

List of queue items. 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).

Value must not be null.




(number or undefined)

Seconds (since the beginning of content) to start playback of the first item to be played. 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 casts the item that was playing locally 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).


(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


non-null Array of non-null cast.framework.messages.QueueItem

Array of queue items. It is sorted (first element will be played first).


(number or undefined)

Id of the media session that the request applies to.

Inherited from


(cast.framework.messages.RepeatMode or undefined)

Behavior of the queue when all items have been played.



Id of the request, used to correlate request/response.

Inherited from


(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


(number or undefined)

The index of the item in the items array that must be the first currentItem (the item that will be played first). Note this is the index of the array (starts at 0) and not the itemId (as it is not known until the queue is created). If repeatMode is REPEAT_OFF playback will end when the last item in the array is played (elements before the startIndex will not be played). This may be useful for continuation scenarios where the user was already using the sender app and in the middle decides to cast. In this way the sender app does not need to map between the local and remote queue positions or saves one extra QUEUE_UPDATE request.