new Sender(config)
Sender
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Configuration object
Properties
|
- Source:
Methods
-
<static> 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:
-
<static> 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:
-
<static> startCasting()
-
Request to start a Chromecasting session. Will cause the browser plugin device selection dialog to open.
- Source:
-
<static> stopCasting()
-
Stop casting an ongoing Chromecast session.
- Source:
Type Definitions
-
onMessageCallback(message)
-
Parameters:
Name Type Description message
String The message data. - Source:
-
onSenderReadyCallback()
-
- Source:
-
onSenderStartedCallback()
-
- Source:
-
onSenderStoppedCallback()
-
- Source: