Video SDK Overview

The EnableX Video SDK is a client-side library that gives your application direct, real-time control over audio and video. You use it to build the UI and experience of your video application — the SDK takes care of WebRTC internals, signalling, and media routing so you don't have to.

Choose Your Platform SDK

EnableX provides SDK libraries for all major client platforms. Each SDK exposes the same concepts — rooms, streams, events, moderator controls — adapted to the language and conventions of that platform.

Web SDK
Web (JavaScript)
EnxRtc.js — runs in Chrome, Firefox, Safari, and Edge with no plugin or install required.
Android SDK
Android
Native Android SDK — Java/Kotlin. Supports API level 21+.
iOS SDK
iOS
Native iOS SDK — Swift/Objective-C. Supports iOS 12+.
React Native SDK
React Native
Cross-platform SDK for iOS and Android from a single codebase.
Flutter SDK
Flutter
Cross-platform Dart SDK for iOS, Android, and Web.
Cordova SDK
Cordova / Ionic
Hybrid mobile app SDK via Cordova plugin. Works with Ionic framework.
New to EnableX? Start with the Web SDK. It has the most complete documentation and gets you to a working video session fastest — no IDE setup, no build system, just a script tag in an HTML page.
Before You Start

Regardless of which SDK you choose, every video session needs these three things ready on your server before the client SDK can connect:

  1. App Credentialsapp_id and app_key from the EnableX Portal. These must stay on your server and never appear in client code.
  2. A Room — create one via the Video API and save the room_id.
  3. A Token — before each user joins, your server calls the Create Token API to generate a signed JWT for that user. Your client app receives the token and passes it to the SDK.

Once your server provides a token, pick your platform SDK above and follow its setup guide to build the client.

What the Video SDK Does

When you build a video application with EnableX, there are two distinct layers:

The SDK lives entirely on the client — in the user's browser, phone, or tablet. It is the bridge between your application UI and the EnableX media infrastructure.

With the Video SDK your application can:

Core Concepts: Methods & Events

The Video SDK is built around two complementary mechanisms. Understanding how they work together is the key to building with any EnableX SDK — Web, Android, iOS, or otherwise.

Methods — You Tell the SDK What To Do

A method is an action your application initiates. When you want something to happen — start recording, mute a participant, share the screen — you call the corresponding SDK method.

Methods take a callback and/or fire an event to tell you whether the action succeeded. Success is always indicated by result: 0 in the response.

Event Listeners — The Server Tells You What Happened

While methods represent your intent, events represent reality. After you (or someone else in the room) triggers an action, the EnableX server processes it and fires an event back to every connected endpoint.

This is a publish-subscribe model: the server is the publisher, and your SDK is the subscriber. Events arrive for actions you initiated, for actions other participants took, and for things the platform did automatically.

You must handle events to build a working application. Simply calling a method is not enough — you need to listen for the corresponding event to know that the action took effect and to update your UI accordingly.

Three Real-World Examples

1. Recording Starts — Everyone Needs to Know

When the moderator clicks "Record" in their app, they call room.startRecord(). EnableX starts recording and immediately fires a room-record-on event to every participant's SDK — including the moderator's own.

Each participant's application should listen for this event to show a recording indicator. This way, all users know they are being recorded, regardless of who initiated it.

// All participants (including moderator) add this listener
room.addEventListener("room-record-on", function(event) {
  // Show the recording badge in UI
  document.getElementById("rec-badge").style.display = "inline-flex";
  console.log("Session recording started");
});

// Listen for recording stopped
room.addEventListener("room-record-off", function(event) {
  document.getElementById("rec-badge").style.display = "none";
  console.log("Session recording stopped");
});

2. Participants Join and Leave

When a new user connects to the room, every existing participant receives a user-connected event with that user's identity. When someone disconnects, user-disconnected fires. Handle these to keep your participant list current.

room.addEventListener("user-connected", function(event, user) {
  console.log("Joined:", user.name, "| Client ID:", user.clientId);
  addParticipantToList(user);
});

room.addEventListener("user-disconnected", function(event, user) {
  console.log("Left:", user.name, "| Client ID:", user.clientId);
  removeParticipantFromList(user.clientId);
});

3. Active Speaker Changes

As participants speak, the server updates the active talker list in real time and fires active-talkers-updated. Your application listens to this to dynamically rearrange video tiles — promoting the loudest speaker to the primary view.

room.addEventListener("active-talkers-updated", function(event) {
  var speakers = event.activeList;
  // speakers is an ordered array — most recently active first
  updateVideoLayout(speakers);
});
Register event listeners before calling connect(). Events like room-connected and stream-added fire as soon as the connection is established. If you add listeners after calling connect(), you risk missing the first events.

Where Events Are Bound: Room vs Stream

Events in the SDK are bound on either the room object or a stream object, depending on what the event relates to.

Room events — events about the session (participants, recording, moderation, chat) — are bound on EnxRoom:

room.addEventListener("room-connected",       function(event) { /* ... */ });
room.addEventListener("stream-added",         function(event) { /* ... */ });
room.addEventListener("user-connected",       function(event, user) { /* ... */ });
room.addEventListener("active-talkers-updated", function(event) { /* ... */ });
room.addEventListener("room-record-on",       function(event) { /* ... */ });

Stream events — events about a specific media track's state (device permissions, mute status) — are bound on an EnxStream instance:

// localStream is an instance of EnxStream
localStream.addEventListener("media-access-allowed", function(event) { /* ... */ });
localStream.addEventListener("media-access-denied",  function(event) { /* ... */ });

Each method's documentation page specifies whether its events fire on the room or the stream — look for the Event entries listed alongside every method.