Recording Events - React Native
VideoSDK provides onRecordingStateChanged
event which will notify you of the current state of recording for the meeting.
onRecordingStateChanged
- This event will be triggered when the meeting's recording status changed.
- This event can be subscribed from the
useMeeting
hook.
Example
Here is the usage of the event mentioned in this page.
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 {
//
}
}
const {
meetingId
...
} = useMeeting({
onRecordingStateChanged,
...
});
API Reference
The API references for all the methods and events utilised in this guide are provided below.
Got a Question? Ask us on discord