Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

OpenTok.js reference

The OpenTok.js library includes the following classes. Use the OT.initSession() method to initialize an OpenTok session and get started.

Class Description
ArchiveEvent Defines event objects for the archiveStarted and archiveStopped events.
AudioLevelUpdatedEvent Dispatched periodically by a Subscriber or Publisher object to indicate the audio level
Capabilities Defines the capabilities property of the Session class.
CaptionReceivedEvent Defines an event object for the captionReceived event dispatched by the Subscriber object.
Connection Represents a connection to an OpenTok session.
ConnectionEvent Dispatched by the Session object when a client connects to or disconnects from a session.
Error Define error objects passed into completion handlers.
Event Defines the basic OpenTok event object that is passed to event listeners.
ExceptionEvent Dispatched by the OT object when the OpenTok API encounters an exception.
MediaStoppedEvent Dispatched by a Publisher when the user has stopped sharing one or all media types (video, audio, or screen).
MuteForcedEvent Dispatched by a Publisher when its audio is muted by a moderator.
OT Use the OT object to initialize OpenTok Session and Publisher objects, set up error logging, and set up exception event handling.
Publisher Provides the mechanism through which control of the published stream is accomplished.
Session Represents an OpenTok session and provides access to much of the OpenTok functionality.
SessionConnectEvent Dispatched by the Session object on the connecting page when the session has successfully connected.
SessionDisconnectEvent Dispatched by the Session object when a session has disconnected.
SignalEvent Dispatched by the Session object when the client receives a signal from the session.
Stream Provides information about an audio-video stream.
StreamEvent The Session object dispatches StreamEvent events when a session has a stream created or destroyed.
StreamPropertyChangedEvent The Session object dispatches StreamPropertyChangedEvent events when a publisher starts or stops publishing audio or video.
Subscriber Provides the mechanism through which control of a subscribed stream is accomplished.
VideoElementCreatedEvent Dispatched by a Subscriber or Publisher object to indicate the video element (or object element in Internet Explorer) was created.
VideoEnabledChangedEvent Defines the event object for the videoDisabled and videoEnabled events dispatched by the Subscriber