Parameters
options: Object
-
options.credentials:
Object
(required) -
options.name:
String
A name for your core instance -
options.packages:
Array
-
options.streamContainers:
Function
-
options.controlsContainer:
String
Connect to the session
Returns: Promise => <resolve: Object, reject: Error>
Disconnect from the session
Returns: Promise => <resolve: empty, reject: Error>
Stop publishing and unsubscribe from all streams
Force a remote connection to leave the session
Parameters
connection: Object
An OpenTok connection object
Returns: Promise => <resolve: empty, reject: Error>
Force the publisher of a stream to stop publishing the stream
Parameters
stream: Object
An OpenTok stream object
Returns: Promise => <resolve: empty, reject: Error>
Get access to an accelerator pack
Parameters
packageName: String
'textChat', 'screenSharing', 'annotation', or 'archiving'
Returns: Object
The instance of the accelerator pack
Returns the current OpenTok session credentials
Returns: Object
Returns the options used for initialization
Returns: Object
Get the local publisher object for a stream
Parameters
stream: Object
An OpenTok stream object
Returns: Object
The publisher object
Get the current OpenTok session object
Returns: Object
Get the local subscriber objects for a stream
Parameters
stream: Object
An OpenTok stream object
Returns: Array
An array of subscriber object
Remove a callback for a specific event. If no parameters are passed, all event listeners will be removed.
Parameters
event: String
The name of the event
callback: Function
Register a callback for a specific event or pass an object with event => callback key/value pairs to register listeners for multiple events.
Parameters
event: String | Object
The name of the event
callback: function
Send a signal using the OpenTok Signaling API
Parameters
type: String
data: *
to: Object
Returns: Promise => <resolve: empty, reject: Error>
Start publishing the local camera feed and subscribing to streams in the session
Parameters
publisherProps: Object
- https://goo.gl/0mL0Eo
Returns: Promise => <resolve: Object, reject: Error>
Get the internal state of acc-core, including streams, publishers, subscribers, a map of stream ids to publisher/subscriber ids, and meta data.
Returns: Object
Subscribe to a stream and update the state
Parameters
stream: Object
An OpenTok stream object
stream: Object
Optional subscriber properties - https://goo.gl/bzjoLL
stream: Boolean
Optional boolean indicating that we are subscribing to our own publisher as part of a network test
Returns: Promise => <resolve: Subscriber, reject: Error >
Enable or disable local audio
Parameters
enable: Boolean
Enable or disable local audio
Enable or disable local video
Parameters
enable: Boolean
Enable or disable local video
Enable or disable remote audio
Parameters
id: String
The subscriber id
enable: Boolean
Enable or disable remote audio
Enable or disable local video
Parameters
id: String
, The subscriber id
enable: Boolean
Enable or disable remote video
Unsubscribe from a stream and update the state
Parameters
subscriber: Object
An OpenTok subscriber object
Returns: Promise => <resolve: empty>