Skip to main content
Record call sessions for later playback. Recordings are stored server-side and can be accessed through call logs or the CometChat Dashboard.
Recording must be enabled for your CometChat app. Contact support or check your Dashboard settings if recording is not available.

Start Recording

Start recording during an active call session:
CallSession.shared.startRecording()
All participants are notified when recording starts.

Stop Recording

Stop an active recording:
CallSession.shared.stopRecording()

Auto-Start Recording

Configure calls to automatically start recording when the session begins:
let sessionSettings = CometChatCalls.sessionSettingsBuilder
    .enableAutoStartRecording(true)
    .build()

Hide Recording Button

Hide the recording button from the default call UI:
let sessionSettings = CometChatCalls.sessionSettingsBuilder
    .hideRecordingButton(true)
    .build()

Listen for Recording Events

Monitor recording state changes using MediaEventsListener:
class CallViewController: UIViewController, MediaEventsListener {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        CallSession.shared.addMediaEventsListener(self)
    }
    
    deinit {
        CallSession.shared.removeMediaEventsListener(self)
    }
    
    func onRecordingStarted() {
        print("Recording started")
        showRecordingIndicator()
    }

    func onRecordingStopped() {
        print("Recording stopped")
        hideRecordingIndicator()
    }

    // Other callbacks...
    func onAudioMuted() {}
    func onAudioUnMuted() {}
    func onVideoPaused() {}
    func onVideoResumed() {}
    func onScreenShareStarted() {}
    func onScreenShareStopped() {}
    func onAudioModeChanged(audioModeType: AudioModeType) {}
    func onCameraFacingChanged(cameraFacing: CameraFacing) {}
}

Track Participant Recording

Monitor when other participants start or stop recording using ParticipantEventListener:
class CallViewController: UIViewController, ParticipantEventListener {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        CallSession.shared.addParticipantEventListener(self)
    }
    
    func onParticipantStartedRecording(participant: Participant) {
        print("\(participant.name ?? "") started recording")
    }

    func onParticipantStoppedRecording(participant: Participant) {
        print("\(participant.name ?? "") stopped recording")
    }

    // Other callbacks...
}

Access Recordings

Recordings are available after the call ends. You can access them in two ways:
  1. CometChat Dashboard: Navigate to Calls > Call Logs in your CometChat Dashboard to view and download recordings.
  2. Programmatically: Fetch recordings through Call Logs.

Recording Object

PropertyTypeDescription
ridStringUnique recording identifier
recordingURLStringURL to download/stream the recording
startTimeIntTimestamp when recording started
endTimeIntTimestamp when recording ended
durationDoubleRecording duration in seconds