Class: CastReceiverOptions

Constructor

CastReceiverOptions

new CastReceiverOptions()

Properties

customNamespaces

non-null Object with non-null cast.framework.system.MessageType properties

Map of custom message namespaces and their types. Custom message namespaces must be initialized before the application starts, so they must be provided in the receiver options. (The default message type is JSON if not provided here).

disableIdleTimeout

(boolean or undefined)

If true, prevents the receiver from being closed when it becomes idle after active playback stops. This property should be used only for non-media apps.

enforceSupportedCommands

constant

boolean

If true, any media command that is not in the supportedCommands map will generate an error. The cast.framework.messages.ErrorReason will be set to NOT_SUPPORTED. Default value is false, which allows media commands to be executed without checking the map.

localSenderId

(string or undefined)

Sender ID used for local requests. Default value is 'local'.

maxInactivity

(number or undefined)

Maximum time in seconds before closing an idle sender connection. Setting this value enables a heartbeat message to keep the connection alive. Used to detect unresponsive senders faster than typical TCP timeouts. The minimum value is 5 seconds; no upper bound is enforced, but it typically takes minutes before platform TCP timeouts come into play. Default value is 10 seconds.

mediaElement

(non-null HTMLMediaElement or undefined)

Media element to play content with. Default behavior is to use the first media element found in the page.

playbackConfig

(non-null cast.framework.PlaybackConfig or undefined)

A playback configuration with custom parameters.

playWatchedBreak

(boolean or undefined)

If true, a client-stitched break will play even if it was already watched.

preferredPlaybackRate

(number or undefined)

The playback rate to use if unspecified in the load request. Allowable range is 0.5 to 2, with 1 being normal speed.

preferredTextLanguage

(string or undefined)

Language to use for the text track if the load request does not specify an active track.

queue

(non-null cast.framework.QueueBase or undefined)

Custom queue implementation.

skipMplLoad

(boolean or undefined)

If true, prevents the receiver from loading the MPL player.

skipPlayersLoad

(boolean or undefined)

If true, prevents the receiver from loading the MPL or Shaka player libraries. Equivalent to setting both skipMplLoad and skipShakaLoad to true.

skipShakaLoad

(boolean or undefined)

If true, prevents the receiver from loading the Shaka player.

statusText

(string or undefined)

Text that represents the application status. It should meet internationalization rules, as it may be displayed by the sender application.

supportedCommands

(number or undefined)

A bitmask of media commands supported by the application. LOAD, PLAY, STOP, GET_STATUS must always be supported. If this value is not provided, then PAUSE, SEEK, STREAM_VOLUME, STREAM_MUTE, EDIT_TRACKS, and PLAYBACK_RATE are also assumed to be supported.

See also
cast.framework.messages.Command

uiConfig

(non-null cast.framework.ui.UiConfig or undefined)

UI Configuration.

useLegacyDashSupport

(boolean or undefined)

If true, use MPL for DASH content.

versionCode

(number or undefined)

An integer used as an internal version number to represent your receiver version. This number is used only to distinguish between receiver releases when collecting metrics. It should be incremented with each release and remain bound to that release in case of a rollback.