new Sender(config)
The Chromecast app Sender that runs in the user's browser.
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Configuration object
Properties
|
- Source:
Methods
onMessage(messageType, callback)
Register a new message handler callback.
Parameters:
Name | Type | Description |
---|---|---|
messageType |
String | Name of message type to listen for. |
callback |
Sender~onMessageCallback | The callback to invoke when the given message type is received. |
- Source:
sendMessage(messageType, message)
Send a message to the Receiver.
Parameters:
Name | Type | Description |
---|---|---|
messageType |
String | Name of the message type to send. |
message |
String | Message data to send. |
- Source:
startCasting()
Request to start a Chromecasting session. Will cause the
browser plugin device selection dialog to open.
- Source:
stopCasting()
Stop casting an ongoing Chromecast session.
- Source: