Skip to main content
Version: 1.x.x

Record Meeting - Javascript

Record meeting allows participants to record video & audio during the meeting. The recording files are available in developer dashboard. Any participant can start / stop recording any time during the meeting.

note

This page uses the following asynchronous methods. Refer to their API reference for the errors each Promise may reject with, and handle these rejections appropriately based on your use case.

This guide will provide an overview of how to implement start and stop Meeting Recording.

  1. Start Recording - By using startRecording() function, a participant can start meeting recording.
  2. Stop Recording - By using stopRecording() function, a participant can stop meeting recording.

Start And Stop Recording

const onPress = async () => {
// Start Recording
try {
await meeting?.startRecording(webhookUrl, awsDirPath, config);
} catch (err) {
console.error("startRecording failed:", err);
}

// Stop Recording
try {
await meeting?.stopRecording();
} catch (err) {
console.error("stopRecording failed:", err);
}
};

Events

  1. recording-state-changed - Whenever any participant starts / stops meeting recording, then recording-state-changed event will trigger.
import { VideoSDK } from "@videosdk.live/js-sdk";

const Constants = VideoSDK.Constants;

meeting.on("recording-state-changed", (data) => {
const { status } = data;

if (status === Constants.recordingEvents.RECORDING_STARTING) {
console.log("Meeting recording is starting");
} else if (status === Constants.recordingEvents.RECORDING_STARTED) {
console.log("Meeting recording is started");
} else if (status === Constants.recordingEvents.RECORDING_STOPPING) {
console.log("Meeting recording is stopping");
} else if (status === Constants.recordingEvents.RECORDING_STOPPED) {
console.log("Meeting recording is stopped");
} else {
//
}
});

Got a Question? Ask us on discord