Realtime Media Streams SDKs

View as Markdown

The Realtime Media Streams (RTMS) SDK provides bindings to receive real-time audio, video, and transcript streams from Zoom Meetings. The RTMS SDK simplifies the process of connecting to RTMS streams, processing realtime media data, and handling session events.

  • Easily receive structured data from Zoom meetings
  • Process audio, video, and transcript data with simple interfaces
  • Receive participant and session updates with automatic event handling
  • Handle webhook events with simplified event subscription and processing
  • Manage multiple concurrent streams for enterprise-scale applications

Create the .env file

So that the RTMS server can communicate with your app, you need to create a .env file. Create a file called .env and add the following.

# Required - Your Zoom OAuth credentials
ZM_RTMS_CLIENT=your_client_id
ZM_RTMS_SECRET=your_client_secret

# Optional - Webhook server configuration
ZM_RTMS_PORT=8080
ZM_RTMS_PATH=/webhook

# Optional - Logging configuration
ZM_RTMS_LOG_LEVEL=debug          # error, warn, info, debug, trace
ZM_RTMS_LOG_FORMAT=progressive    # progressive or json
ZM_RTMS_LOG_ENABLED=true          # true or false

To get started with the RTMS SDK, choose the language and platform that best fits your needs.

RTMS Node.js SDK

The RTMS Node.js SDK provides access to real-time audio, video, and transcript data from Zoom meetings. It offers webhook integration, client-based, and singleton approaches for connecting to meetings.

Install the SDK

npm install @zoom/rtms

Use the SDK

Easily respond to webhook events and connect to RTMS using the onWebhookEvent.

import rtms from "@zoom/rtms";

// CommonJS
// const rtms = require('@zoom/rtms').default;

rtms.onWebhookEvent(({event, payload}) => {
    // Event name varies by product: "meeting.rtms_started", "session.rtms_started", etc.
    if (event !== "meeting.rtms_started") return;

    const client = new rtms.Client();

    client.onAudioData((data, timestamp, metadata) => {
        console.log(`Received audio: ${data.length} bytes from ${metadata.userName}`);
    });

    client.join(payload);
});

Class-based approach

If your application requires multiple concurrent connections or advanced control.

import rtms from "@zoom/rtms";

const client = new rtms.Client();

client.onAudioData((data, timestamp, metadata) => {
    console.log(`Received audio: ${data.length} bytes`);
});

client.join({
    meeting_uuid: "your_meeting_uuid",
    rtms_stream_id: "your_stream_id",
    server_urls: "wss://example.zoom.us",
});

Global singleton

For applications that only require a single stream.

import rtms from "@zoom/rtms";

rtms.onAudioData((data, timestamp, metadata) => {
    console.log(`Received audio from ${metadata.userName}`);
});

rtms.join({
    meeting_uuid: "your_meeting_uuid",
    rtms_stream_id: "your_stream_id",
    server_urls: "wss://rtms.zoom.us"
});