Class: CastOptions

  • CastOptions provides configuration for Cast integration, allowing customization of session behavior and application compatibility.

  • It offers properties to control auto-joining, receiver application selection, language preferences, and credentials.

  • Developers can set options like androidReceiverCompatible, autoJoinPolicy, receiverApplicationId, and more to tailor the Cast experience.

  • The CastOptions constructor accepts an optional argument to pre-populate values, simplifying initialization.

Constructor

CastOptions

new CastOptions(opt_options)

Parameter

opt_options

Optional

cast.framework.CastOptions

Optional options to copy from. Only defined value are used, otherwise the default value is used.

Value must not be null.

Properties

androidReceiverCompatible

boolean

Indicates if the app is compatible with an Android Receiver.

autoJoinPolicy

non-null chrome.cast.AutoJoinPolicy

Indicates if to join a running session on initialization.

credentialsData

nullable chrome.cast.CredentialsData

Credentials data used to identify the credentials of the sender.

language

nullable string

Language to use.

receiverApplicationId

nullable string

Cast application id.

resumeSavedSession

boolean

If true, a session will be re-joined without reloading the page.