Google Cast Chrome Sender API Reference

chrome.cast.VERSION

The API version.

chrome.cast.timeout

Default timeout values in milliseconds for API methods.

chrome.cast.isAvailable

Flag for clients to check whether the API is loaded.

chrome.cast.initialize

static void chrome.cast.initialize(apiConfig, successCallback, errorCallback)
Initializes the API. Note that either successCallback and errorCallback will be invoked once the API has finished initialization. The sessionListener and receiverListener may be invoked at any time afterwards, and possibly more than once.
Parameters:
chrome.cast.ApiConfig apiConfig
The object with parameters to initialize the API. Must not be null.
function() successCallback
function(chrome.cast.Error) errorCallback
The possible errors are TIMEOUT, INVALID_PARAMETER, EXTENSION_MISSING.

chrome.cast.requestSession

static void chrome.cast.requestSession(successCallback, errorCallback, opt_sessionRequest)
Requests that a receiver application session be created or joined. By default, the SessionRequest passed to the API at initialization time is used; this may be overridden by passing a different session request in opt_sessionRequest.
Parameters:
function(chrome.cast.Session) successCallback
function(chrome.cast.Error) errorCallback
The possible errors are TIMEOUT, INVALID_PARAMETER, API_NOT_INITIALIZED, CANCEL, CHANNEL_ERROR, SESSION_ERROR, RECEIVER_UNAVAILABLE, and EXTENSION_MISSING. Note that the timeout timer starts after users select a receiver. Selecting a receiver requires user's action, which has no timeout.
chrome.cast.SessionRequest opt_sessionRequest
Optional.

chrome.cast.logMessage

static void chrome.cast.logMessage(message)
Logs a debug message from the app. This message may be sent in a feedback report to Google if users explicitly choose to include fine logs.
Parameters:
string message
The message to log.

chrome.cast.setCustomReceivers

static void chrome.cast.setCustomReceivers(receivers, successCallback, errorCallback)
Sets custom receiver list
Parameters:
Array of chrome.cast.Receiver receivers
The new list. Must not be null.
function() successCallback
function(chrome.cast.Error) errorCallback
The possible errors are TIMEOUT, API_NOT_INITIALIZED, INVALID_PARAMETER, CHANNEL_ERROR, and EXTENSION_MISSRING.
Holds the configuraton for the API when initialized.
Properties
Auto-join policy determines when the SDK will automatically connect a sender application to an existing session after API initialization.
Values
Capabilities that are supported by the receiver device.
Values
Default action policy determines when the SDK will automatically create a session after initializing the API.
Values
Possible states of a DIAL application.
Values
An object passed to customDialLaunchCallback after users select a DIAL receiver.
Properties
An object returned by customDialLaunchCallback to indicate whether app wants extension to do a DIAL launch or not.
Properties
A request to start a DIAL app.
Properties
Describes an error returned by the API.
Properties
Errors that may be returned by the SDK.
Values
An image that describes a receiver application or media item.
Properties
A generic media description.
Properties
Possible reason why a media is idle.
Values
A request to load new media into the player.
Properties
Represents a media item that has been loaded into the receiver application.
Functions
Properties
Possible media commands supported by the receiver application.
Values
Describes a media item.
Properties
Possible types of media metadata.
Values
A movie media description.
Properties
A music track media description.
Properties
A request to pause the currently playing media.
Properties
A photo media description.
Properties
Possible states of the media player.
Values
A request to play the currently paused media.
Properties
States of the media player after resuming.
Values
A request to seek the current media.
Properties
A request to stop the media player.
Properties
Possible media stream types.
Values
Default timeout values in milliseconds for media API methods.
Properties
A TV episode media description.
Properties
A request to set the stream volume of the playing media.
Properties
Describes the receiver running an application.
Properties
Describes availability of a Cast receiver.
Values
Values
Describes a sender application.
Properties
Describes a sender application platform.
Values
Describes the state of a currently running Cast application.
Functions
Properties
A request to start or connect to a session.
Properties
Default timeout values in milliseconds for API methods.
Properties
The volume of a device or media stream.
Properties

Index of all classes and functions

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.