Have you explored the newest version of the OpenTok platform? Check out OpenTok 2.0, built on top of WebRTC. Learn more

SessionConnectEvent class

The Session object dispatches SessionConnectEvent object when a session has successfully connected in response to a call to the connect() method of the Session object.

For an example, see Session.connect().

SessionConnectEvent properties

The SessionConnectEvent object has the following properties:

archives (Array[Archive]) — An array of Archive objects. Each Archive object represents an archive that is currently being recorded (at the time you connect to the session). You can check the type property of each Archive object to see if the archive is "perSession". If it is, then each stream published to the session is being recorded.

connections (Array[Connection]) — An array of Connection objects, representing connections to the session. (Note that each connection can publish multiple streams.)

target (Object) — The object that dispatched the event.

type (String) — The type of event. There is only one type of SessionConnectEvent object: "sessionConnected".

streams (Array[Stream]) — An array of Stream objects corresponding to the streams currently available in the session that has connected.

IRC Live Chat

Have a quick question? Chat with TokBox Support on IRC. Join chat