Creates a new RTMS Client instance
Each Client instance represents a connection to a single Zoom meeting. You can create multiple Client instances to connect to different meetings.
Joins a Zoom RTMS session with parameters object
This method establishes a connection to a Zoom RTMS stream. After joining, callback methods will be invoked as events occur.
An object containing join parameters
true if the join operation succeeds
Joins a Zoom RTMS session with individual parameters
This method establishes a connection to a Zoom RTMS stream. After joining, callback methods will be invoked as events occur.
The UUID of the Zoom meeting
The RTMS stream ID for this connection
The authentication signature
The server URL(s) to connect to
Optionaltimeout: numberThe timeout for the join operation in milliseconds
true if the join operation succeeds
Sets a callback for active speaker change events
This automatically subscribes to EVENT_ACTIVE_SPEAKER_CHANGE.
The callback function to invoke
true if the callback was set successfully
Sets a callback for receiving audio data
This callback is triggered when audio data is received from the meeting. It provides the raw audio data buffer and metadata about the sender.
The callback function to invoke
true if the callback was set successfully
client.onAudioData((buffer, size, timestamp, metadata) => {
console.log(`Received ${size} bytes of audio from ${metadata.userName}`);
// Process the audio data
// buffer - Raw audio data (Buffer)
// size - Size of the audio data in bytes
// timestamp - Timestamp of the audio data
// metadata - Information about the sender
});
Sets a callback for receiving deskshare data
This callback is triggered when data is received from the meeting. It provides the raw audio data buffer and metadata about the sender.
The callback function to invoke
true if the callback was set successfully
client.onDsData((buffer, size, timestamp, metadata) => {
console.log(`Received ${size} bytes of deskshare data from ${metadata.userName}`);
// Process the data
// buffer - Raw deskshare data (Buffer)
// size - Size of the deskshare data in bytes
// timestamp - Timestamp of the deskshare data
// metadata - Information about the sender
});
Sets a callback for raw event data
This provides access to the raw JSON event data from the SDK. Use this when you need custom event handling or access to all event types. This callback is called IN ADDITION to typed callbacks, not instead of.
The callback function to invoke with raw JSON string
true if the callback was set successfully
Sets a callback for join confirmation events
This callback is triggered when the join operation is confirmed by the server.
The callback function to invoke
true if the callback was set successfully
Sets a callback for leave events
This callback is triggered when the client leaves the meeting, either voluntarily or due to an error.
The callback function to invoke
true if the callback was set successfully
Sets a callback for media connection interrupted events
This automatically subscribes to EVENT_MEDIA_CONNECTION_INTERRUPTED.
The callback function to invoke with the event timestamp
true if the callback was set successfully
Sets a callback for participant join/leave events
This automatically subscribes to EVENT_PARTICIPANT_JOIN and EVENT_PARTICIPANT_LEAVE. Events are delivered as parsed objects, not raw JSON.
The callback function to invoke
true if the callback was set successfully
Sets a callback for session update events
This callback is triggered when session information is updated. It provides details about session status changes (add, stop, pause, resume).
The callback function to invoke
true if the callback was set successfully
Sets a callback for sharing start/stop events
This automatically subscribes to EVENT_SHARING_START and EVENT_SHARING_STOP. Note: These events only work when the RTMS app has DESKSHARE scope permission.
The callback function to invoke
true if the callback was set successfully
Sets a callback for receiving transcript data
This callback is triggered when transcript data is received from the meeting. It provides the raw transcript data buffer and metadata about the sender.
The callback function to invoke
true if the callback was set successfully
Sets a callback for raw SDK user update events (participant join/leave)
This is the low-level SDK callback. For most use cases, prefer onParticipantEvent which provides a more convenient API with automatic event subscription.
The callback function to invoke
true if the callback was set successfully
Sets a callback for receiving video data
This callback is triggered when video data is received from the meeting. It provides the raw video data buffer, track ID, and metadata about the sender.
The callback function to invoke
true if the callback was set successfully
client.onVideoData((buffer, size, timestamp, trackId, metadata) => {
console.log(`Received ${size} bytes of video from ${metadata.userName}`);
console.log(`Track ID: ${trackId}`);
// Process the video data
// buffer - Raw video data (Buffer)
// size - Size of the video data in bytes
// timestamp - Timestamp of the video data
// trackId - ID of the video track
// metadata - Information about the sender
});
Manually polls for events from the RTMS server
This method is automatically called by the SDK's internal polling mechanism. You typically don't need to call this manually.
true if the poll operation succeeds
Releases client resources
This method disconnects from the server and releases resources. It's automatically called by the leave method.
true if the release operation succeeds
Sets audio parameters for the client (OPTIONAL)
This method configures audio processing parameters. AudioParams now has sensible defaults, so calling this method is optional. Defaults enable per-participant audio with userId in metadata (dataOpt=AUDIO_MULTI_STREAMS).
You can override individual fields without setting all parameters:
Audio parameters configuration (merges with defaults)
true if the operation succeeds
Sets deskshare parameters for the client
This method configures deskshare video processing parameters.
Deskshare parameter configuration
true if the operation succeeds
Sets video parameters for the client
This method configures video processing parameters.
Video parameters configuration
true if the operation succeeds
Gets the stream ID of the current connection
The RTMS stream ID
Subscribe to receive specific event types
This method allows you to subscribe to specific event types from the SDK. Note: Typed event callbacks (onParticipantEvent, onActiveSpeakerEvent, etc.) automatically subscribe to their respective events.
Array of event type constants (EVENT_PARTICIPANT_JOIN, etc.)
true if subscription was successful
Unsubscribe from specific event types
This method allows you to unsubscribe from specific event types.
Array of event type constants to unsubscribe from
true if unsubscription was successful
Gets the UUID of the current meeting
The meeting UUID
StaticinitializeInitializes the RTMS SDK with the specified CA certificate path
This static method must be called before creating any Client instances. It's automatically called by the join method if not already initialized.
OptionalcaPath: stringPath to the CA certificate file (defaults to system CA)
true if initialization succeeds
StaticuninitializeUninitializes the RTMS SDK and releases resources
This static method should be called when you're done using the SDK. It releases all system resources allocated by the SDK.
true if uninitialization succeeds
RTMS Client: Core interface for connecting to Zoom real-time media streams
The Client class provides the main interface for connecting to and processing Zoom RTMS streams. Use this approach when you need to:
Example