Objective
Obtaining the number of connections in a session.
Applies To
- Video API
- Session Connections
Procedure
The session object dispatches a connectionCreated event for each client connected to the session. To count the number of connections in the session:
- Create a variable called numberOfConnections and initialize it to zero.
- Listen to the "connectionCreated" event and increment the variable numberOfConnections inside the event handler. The value of this variable then gives you the number of clients connected to the session at any instant of time.
Articles in this section
- How to use Completion handler for Exception Handling
- Firefox Pre-call test not supported
- Error Creating Session Using Vonage Video API .NET SDK
- Unable to Create Session Even Though API Key and Secret Are Valid
- HTTP 415 Error When Archiving Video Session
- Troubleshooting Invalid JWT When Creating a Video Session using REST API
- Camara Still in Use after Session Disconnect on Android
- Token Shows as Invalid
- HTTP 400 Error When Archiving Video Session
- 1541 Timed out while attempting to publish Error