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.
chrome.cast.ApiConfig
Holds the configuraton for the API when initialized.
| Properties |
|---|
chrome.cast.AutoJoinPolicy
Auto-join policy determines when the SDK will automatically connect a sender
application to an existing session after API initialization.
| Values |
|---|
chrome.cast.Capability
Capabilities that are supported by the receiver device.
| Values |
|---|
chrome.cast.DefaultActionPolicy
Default action policy determines when the SDK will automatically create a
session after initializing the API.
| Values |
|---|
chrome.cast.DialAppState
Possible states of a DIAL application.
| Values |
|---|
chrome.cast.DialLaunchData
An object passed to customDialLaunchCallback after users select a DIAL
receiver.
| Properties |
|---|
chrome.cast.DialLaunchResponse
An object returned by customDialLaunchCallback to indicate whether app wants
extension to do a DIAL launch or not.
| Properties |
|---|
chrome.cast.DialRequest
A request to start a DIAL app.
| Properties |
|---|
chrome.cast.Error
Describes an error returned by the API.
| Properties |
|---|
chrome.cast.ErrorCode
Errors that may be returned by the SDK.
| Values |
|---|
chrome.cast.Image
An image that describes a receiver application or media item.
| Properties |
|---|
chrome.cast.media.GenericMediaMetadata
A generic media description.
| Properties |
|---|
chrome.cast.media.IdleReason
Possible reason why a media is idle.
| Values |
|---|
chrome.cast.media.LoadRequest
A request to load new media into the player.
| Properties |
|---|
chrome.cast.media.Media
Represents a media item that has been loaded into the receiver application.
| Functions | |
|---|---|
| Properties |
chrome.cast.media.MediaCommand
Possible media commands supported by the receiver application.
| Values |
|---|
chrome.cast.media.MediaInfo
Describes a media item.
| Properties |
|---|
chrome.cast.media.MetadataType
Possible types of media metadata.
| Values |
|---|
chrome.cast.media.MovieMediaMetadata
A movie media description.
| Properties |
|---|
chrome.cast.media.MusicTrackMediaMetadata
A music track media description.
| Properties |
|---|
chrome.cast.media.PauseRequest
A request to pause the currently playing media.
| Properties |
|---|
chrome.cast.media.PhotoMediaMetadata
A photo media description.
| Properties |
|---|
chrome.cast.media.PlayerState
Possible states of the media player.
| Values |
|---|
chrome.cast.media.PlayRequest
A request to play the currently paused media.
| Properties |
|---|
chrome.cast.media.ResumeState
States of the media player after resuming.
| Values |
|---|
chrome.cast.media.SeekRequest
A request to seek the current media.
| Properties |
|---|
chrome.cast.media.StopRequest
A request to stop the media player.
| Properties |
|---|
chrome.cast.media.StreamType
Possible media stream types.
| Values |
|---|
chrome.cast.media.timeout
Default timeout values in milliseconds for media API methods.
| Properties |
|---|
chrome.cast.media.TvShowMediaMetadata
A TV episode media description.
| Properties |
|---|
chrome.cast.media.VolumeRequest
A request to set the stream volume of the playing media.
| Properties |
|---|
chrome.cast.Receiver
Describes the receiver running an application.
| Properties |
|---|
chrome.cast.ReceiverAvailability
Describes availability of a Cast receiver.
| Values |
|---|
chrome.cast.ReceiverType
| Values |
|---|
chrome.cast.SenderApplication
Describes a sender application.
| Properties |
|---|
chrome.cast.SenderPlatform
Describes a sender application platform.
| Values |
|---|
chrome.cast.Session
Describes the state of a currently running Cast application.
| Functions | |
|---|---|
| Properties |
chrome.cast.SessionRequest
A request to start or connect to a session.
| Properties |
|---|
chrome.cast.timeout
Default timeout values in milliseconds for API methods.
| Properties |
|---|
chrome.cast.Volume
The volume of a device or media stream.
| Properties |
|---|