Skip to main content

Recording

The meeting.recording object in Dyte's Android Core SDK provides APIs to manage recording within a meeting.

Recording State

The meeting.recording.recordingState property indicates the current state of the recording. Possible states include IDLE, STARTING, RECORDING, PAUSED, and STOPPING.

Starting a Recording

To start a recording, use the start() method of the meeting.recording object.

meeting.recording.start()

Stopping a Recording

To stop an active recording, use the stop() method.

meeting.recording.stop()

Pausing a Recording

To temporarily pause a recording, use the pause() method.

meeting.recording.pause()

Resuming a Recording

To resume a paused recording, use the resume() method.

meeting.recording.resume()

Listening for Recording Events

To handle recording-related events, implement the DyteRecordingEventsListener interface. This interface provides callbacks for various recording events:

  • 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(state: DyteRecordingState): Notifies when there is a change in the recording state.
  • onMeetingRecordingStopError(e: Exception): Indicates an error occurred while stopping an active recording.
  • onMeetingRecordingPauseError(e: Exception): Indicates an error occurred while pausing an active recording.
  • onMeetingRecordingResumeError(e: Exception): Indicates an error occurred while resuming a paused recording.
meeting.addRecordingEventsListener(object : DyteRecordingEventsListener {
override fun onMeetingRecordingStarted() {
// Handle recording started
}

override fun onMeetingRecordingEnded() {
// Handle recording stopped
}

override fun onMeetingRecordingStateUpdated(state: DyteRecordingState) {
// Handle recording state update
}

override fun onMeetingRecordingStopError(e: Exception) {
// Handle recording stop error
}

override fun onMeetingRecordingPauseError(e: Exception) {
// Handle recording pause error
}

override fun onMeetingRecordingResumeError(e: Exception) {
// Handle recording resume error
}
})

Implement these callbacks to handle recording events and errors appropriately in your application.