Quick Reference for AI Agents & Developers
- Enable recording:
CallSettingsBuilder().startRecordingOnCallStart(true).build() - Start recording:
CallManager.startRecording() - Stop recording:
CallManager.stopRecording() - Show button:
CallSettingsBuilder().showCallRecordButton(true).build() - Related: Call Session · Ringing · Calling Overview
Implementation
Once you have decided to implement Default Calling or Direct Calling calling and followed the steps to implement them. Just few additional listeners and methods will help you quickly implement call recording in your app. You need to make changes in the CometChat.startCall method and add the required listeners for recording. Please make sure your callSettings is configured accordingly for Default Calling or Direct Calling. A basic example of how to make changes to implement recording for a direct/default call:- Swift
Settings for call recording
TheCallSettings class allows you to customise the overall calling experience. The properties for the call/conference can be set using the CallSettingsBuilder class. This will eventually give you an object of the CallSettings class which you can pass to the startCall() method to start the call.
The options available for recording of calls are:
| Setting | Type | Default | Description |
|---|---|---|---|
showCallRecordButton(_:) | Bool | false | Show/hide recording button in UI |
startRecordingOnCallStart(_:) | Bool | false | Auto-start recording when call starts |
Sample Payloads - Recording Settings
Sample Payloads - Recording Settings
- Auto-Start Recording
- Both Settings Enabled
Show Recording Button
- Swift
Auto-Start Recording
- Swift
Start Recording
You can use thestartRecording() method to start call recording manually during an active call.
- Swift
Stop Recording
You can use thestopRecording() method to stop call recording.
- Swift
Recording Listener
ImplementCallsEventsDelegate to receive recording state change notifications. All participants receive the onRecordingToggled callback when recording starts or stops.
- Swift
Sample Payloads - Recording Listener
Sample Payloads - Recording Listener
- onRecordingToggled
RTCRecordingInfo Object:
Triggered When:
| Property | Type | Description |
|---|---|---|
| isRecording | Bool? | Is recording currently active |
| startedBy | RTCUser? | User who started recording |
| Scenario | Callback Received |
|---|---|
CallManager.startRecording() called | Yes - all participants |
CallManager.stopRecording() called | Yes - all participants |
| Recording button pressed in UI | Yes - all participants |
| Auto-start recording on call start | Yes - all participants |
| Call ends while recording | Recording auto-stops |