Constructor

QueueLoadRequestData

new QueueLoadRequestData(items)

Parameter

items

Array of non-null cast.receiver.media.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.

Extends
cast.receiver.MediaManager.RequestData

Properties

currentTime

(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).

customData

unknown

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.receiver.MediaManager.RequestData#customData

items

non-null Array of non-null cast.receiver.media.QueueItem

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

mediaSessionId

unknown

Id of the media session that the request applies to.

Inherited from
cast.receiver.MediaManager.RequestData#mediaSessionId

repeatMode

(cast.receiver.media.RepeatMode or undefined)

Behavior of the queue when all items have been played.

requestId

unknown

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

Inherited from
cast.receiver.MediaManager.RequestData#requestId

startIndex

(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.