Skip to main content

Recording

The dyteClient.recording object can be used start and stop recordings in a meeting.

Recording State

The dyteClient.recording.recordingState property indicates the current state of the recording. Possible states include idle, recording, starting, stopping.

Start a recording

To start a recording, you need to call the start() method in the dyteClient.recording object, as shown below.

dyteClient.recording.start();

Stop a recording

To stop a recording, you need to call the stop() method in the dyteClient.recording object, as shown below.

dyteClient.recording.stop();

Listening for Recording Events

To handle recording-related updates, you need to listen for onMeetingRecordingStateUpdated() event. This returns DyteRecordingState object with it.

Listen to recording state changes

To handle recording-related updates, you need to implement DyteMeetingRoomEventsListener. This interface provides callbacks for various recording events as described in excerpt below:

  • onMeetingRecordingStarted(): Called when the recording is started or resumed, either by the user or their peer.
  • onMeetingRecordingEnded(): Called when the recording is stopped or paused, either by the user or their peer.
  • onMeetingRecordingStateUpdated(DyteRecordingState recordingState): Notifies when there is a change in the recording state.
  • onMeetingRecordingStopError(String error): Indicates an error occurred while stopping an active recording.
  • onMeetingRecordingPauseError(String error): Indicates an error occurred while pausing an active recording.
  • onMeetingRecordingResumeError(String error): Indicates an error occurred while resuming a paused recording.

class RecordingListener with DyteRecordingEventsListener {


void onMeetingRecordingStarted() {
/// Handle starting of recording
}


void onMeetingRecordingStateUpdated(DyteRecordingState recordingState) {
/// Handle status update of recording
}


void onMeetingRecordingEnded() {
/// Handle recording ended
}


void onMeetingRecordingStopError(String error) {
/// Handle recording error
}

}

You can subscribe to this events by addRecordingListener method:

dyteClient.addRecordingListener(RecordingListener());