Basic Vonage Video API Functionality
The Vonage Video API platform makes it possible to embed real-time, high-quality interactive video, messaging, screen-sharing, and more into web and mobile apps. The platform includes client libraries for the web, mobile and desktop platform as well as server-side SDKs. Vonage Video API uses WebRTC for audio-video communications.
All applications built with the Vonage Video API platform require two primary components:
- The Client — client-side code that runs in a browser, directly on your computer or on mobile, set up by the developer using the Vonage Video client-side libraries. The client-side handles the majority of Vonage Video API functionality.
- The Server — server-side code executed on a web server set up by the developer using the Vonage Video API server SDKs. There are server-side SDKs available for several languages.
Functions of the client and server
Client:
App Server:
Session:
| ![]() |
Sessions
Every Vonage video chat occurs within a session. You can think of a session as a "room" where clients can interact with one another in real-time. Sessions are hosted on the Vonage Video API cloud and manage user connections, audio-video streams, and user events (such as a new user joining). Each session is associated with a unique session ID. To allow multiple clients to chat with one another, you would have them connect to the same session (using the same session ID).
The app server (with server SDK integration) is responsible for creating new sessions and generating unique authentication tokens for each new client. The client then uses that token to establish a connection to the session. Clients connected to a session can publish streams to the session and subscribe to other clients’ streams.
Debugging Sessions using the session inspector
If you want to view information about a specific session, you can use Inspector. This tool provides a complete breakdown of the session, including users, quality, events, errors, and more. This is useful for debugging and getting a better understanding of what's happening in your app's sessions.
Connecting, publishing, and subscribing
This section provides a visual breakdown of the steps required for two clients to initiate a video chat session.
Step 1: The session is created by your app server
Your app server creates a session in the cloud via the Vonage Video REST API or Server SDK and receives the session ID. Think of the session as a "room" where the video chat will occur. At this point it is unoccupied.
Step 2: A client loads the app and the server creates a token
When a user loads your client-side application, the client (a web page or mobile app) gets session info from the server. This includes a unique authentication token (the client’s "key") created by your app server.
Step 3: The client connects and begins streaming to the session
The client uses the session ID and token to establish a connection with the session. The client can then publish an audio-video stream to the session and listen for important events (such as a new user joining the session). At this point, the client is the only participant in the session.
Step 4: A new client connects to the session
When a new user loads the client-side application in a separate web page or mobile device (Client 2), the new client receives the session ID and a unique token from your app server. The client uses that info to establish a connection to the session.
Step 5: The clients subscribe to each other’s streams
Now that it’s connected to the session, Client 2 can subscribe to Client 1’s stream. Client 2 then publishes its own video stream to the session, and Client 1 subscribes to it. Both clients are now subscribed to each other's stream in a one-to-one video chat, and both are "listening" for new events (such as a new user connecting the session.)
The Vonage video platform supports one-to-one communication and group communication. Multiple clients can connect to a session and each connected client can subscribe to each stream in the session. In addition to the basic functionality above, the Vonage Video platform provides the ability to save recordings of sessions.
Building a Vonage Video application
After reviewing the materials above, you should have a basic understanding of how the Vonage video platform works.
You can also find a list of key terms and definitions in the Technical Details page.
