Skip to main content

Recording

The meeting.recording object in Dyte's iOS 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.
extension  MeetingViewModel: DyteRecordingEventsListener {
func onMeetingRecordingStarted() {
// Handle recording started
}

func onMeetingRecordingEnded() {
// Handle recording stopped
}

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

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

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

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

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