Record Meeting - React Native
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.
This guide will provide an overview of how to implement start and stop Meeting Recording.
-
Start Recording - By using
startRecording()function, a participant can start meeting recording. -
Stop Recording - By using
stopRecording()function, a participant can stop meeting recording.
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.
Start And Stop Recording
import { useMeeting } from "@videosdk.live/react-native-sdk";
const MeetingView = () => {
const { startRecording, stopRecording } = useMeeting();
const onPress = async () => {
// Start Recording
try {
await startRecording(webhookUrl, awsDirPath);
} catch (err) {
console.error("startRecording failed:", err);
}
// Stop Recording
try {
await stopRecording();
} catch (err) {
console.error("stopRecording failed:", err);
}
};
return <>...</>;
};
Events
-
recording-started - Whenever any participant start meeting recording, then
recording-startedevent will trigger. -
recording-stopped - Whenever any participant stop meeting recording, then
recording-stoppedevent will trigger. -
recording-state-changed - Whenever meeting recording state changes, then
recording-state-changedevent will trigger.
import { Constants, useMeeting } from "@videosdk.live/react-native-sdk";
function onRecordingStateChanged(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 {
//
}
}
/** useMeeting hooks events */
const {
/** Methods */
} = useMeeting({
onRecordingStarted: () => {
console.log("Recording Started");
},
onRecordingStopped: () => {
console.log("Recording Stopped");
},
onRecordingStateChanged,
});
Got a Question? Ask us on discord

