Technical Details

Note: TokBox is now Vonage Video

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.

Below, you'll find some Key Terms that are useful to know when reading the Video API documentation. Once you've read this section, take a look at the Video API Basics Overview for more information on how the API works.

Key terms

Session

You can think of a session as a "room" where clients can interact with one another in real-time — associated with a unique session ID. New sessions are generated by your app server via the server SDKs. Clients can obtain the session ID and a unique authentication token from the server to initialize and connect to the session, after which they can publish streams and subscribe to streams in the session, as well as listen for events dispatched by the session (such as a new user connecting).

Check out our developer guides to learn how to create a session with the server SDKs, join a session with the client SDKs, and explore more session-related functionality.

Token

A token is a unique authentication "key" that allows a client to join a session. When a client attempts to join a session, your app server generates a unique token and sends it to the client along with the session ID. Tokens have expiration dates (specified by the server), whereas sessions never expire. Tokens can also be assigned roles — publisher, subscriber, or moderator, which determine the permissions of the client, such as publishing streams and subscribing to streams in the session.

Check out our developer guides to learn how to create a token with the server SDKs and join a session with the client SDKs. When building a demo or proof of concept, you can generate tokens using your Vonage Account by creating a project, browsing to the Project Overview, and scrolling down to project tools, but a server component must be set up before going to production.

Client

A client is any browser, desktop or mobile app utilizing client-side code from the Vonage Video client SDKs. The client is one of two key components that make up a Vonage Video application (the other being the server), and is responsible for most of the Vonage Video functionality, such as connecting to a session, publishing and subscribing to streams, listening for session events, and dispatching events to the session.

Before interacting with a session, the client must receive the session ID and token generated by your app server. Check out our Client Side SDKs to learn how to implement client-side functionality, as well as our developer guides for more information.

Server

The app server, set up by the app developer using the Vonage Video server SDKs. This generates new sessions and tokens, which it then sends to the client. All Vonage Video applications require both a client and server component. Check out our developer guides to learn how to create a session and create a token with the server SDKs, as well as other functionality handled by the server.

Connection

A client interacts with the session via a persistent event (or signaling) connection, which uses WebSockets to constantly listen for new events dispatched by the session. This connection is different from the WebRTC media connection(s) established when clients publish and subscribe to streams in the session.

In order to establish a connection to a session, the client must receive a session ID and token from your app server, which are then used for authentication. Each client usually opens a single connection to a given session, and each client connection to the session is associated with a unique connection ID. Check out our developer guides to learn how to connect to a session with the client SDKs.

Stream

A stream is a single audio-video signal, which includes a user's published camera and microphone feed. During a session, clients publish streams to the session and subscribe to other clients’ streams. When a new stream is created, an event is dispatched by both the Publisher object and Session object.

Publish

Once a client is connected to a session, it can publish an audio-video stream to the session using the device’s webcam and microphone. The client’s token role (publisher, subscriber, moderator) determines whether that client can publish to the session. This allows for sessions with only one or two publishers but many subscribers (one-to-many). Check out our developer guides to learn how to publish a stream to a session with the client SDKs.

Subscribe

Once a client is connected to a session, it can subscribe to any audio-video streams published by other clients in the session. Check out our developer guides to learn how to subscribe to streams in a session with the client SDKs.

Events

Once a client establishes a connection to a session, it is able to listen for events dispatched by the session. Events are dispatched for a variety of reasons, such as a new stream being created or a new client connecting or disconnecting from the session. If you want a client to react to a certain event, you must set up an event listener.

Client SDK

The client SDKs are a set of code libraries available for web (JavaScript) used to set up the client. The client-side code handles the majority of Vonage Video API functionality, including publishing and subscribing to streams in the session and listening for session events.

Server SDK

The server SDKs are a set of wrappers for the Vonage Video REST API. This enables you to generate new sessions and tokens for the client.

Vonage Video REST API

The Vonage Video REST API is a list of HTTP based endpoints through which you can access the video platform functionalities. The server SDKs implement many of the endpoints of the REST API.

Vonage Video Cloud

This contains the core implementation needed to manage sessions, client connections, API calls, signaling, events etc.