Skip to main content
Quick Reference for AI Agents & Developers
// Enable recording in call settings
const callSettings = new CometChatCalls.CallSettingsBuilder()
  .showRecordingButton(true)           // Show recording button in UI
  .startRecordingOnCallStart(true)     // Auto-start recording
  .setCallListener(new CometChatCalls.OngoingCallListener({
    onRecordingStarted: (event) => console.log("Recording started"),
    onRecordingStopped: (event) => console.log("Recording stopped")
  }))
  .build();

// Manual recording control
CometChatCalls.startRecording();
CometChatCalls.stopRecording();

// Access recordings: Dashboard > Calls > View Recordings
Available via: SDK | Dashboard
Record your voice and video calls for playback, compliance, training, or archival purposes.
Recordings are stored and accessible from the CometChat Dashboard under the Calls section.

Prerequisites

Before implementing recording, ensure you have:
  1. Completed the Calls SDK Setup
  2. Implemented either Ringing or Call Session calling

Implementation

Add recording listeners to your call settings to receive recording state updates:
const callListener = new CometChatCalls.OngoingCallListener({
  onRecordingStarted: (event) => {
    console.log("Recording started by:", event.user.getName());
    // Update UI to show recording indicator
  },
  onRecordingStopped: (event) => {
    console.log("Recording stopped by:", event.user.getName());
    // Update UI to hide recording indicator
  },
  // ... other listeners
});

const callSettings = new CometChatCalls.CallSettingsBuilder()
  .enableDefaultLayout(true)
  .setIsAudioOnlyCall(false)
  .showRecordingButton(true)  // Show recording button in UI
  .setCallListener(callListener)
  .build();

const htmlElement = document.getElementById("call-container");
CometChatCalls.startSession(callToken, callSettings, htmlElement);

Recording Settings

Configure recording behavior using CallSettingsBuilder:
MethodDescriptionDefault
showRecordingButton(boolean)Show/hide the recording button in the call UIfalse
startRecordingOnCallStart(boolean)Automatically start recording when call beginsfalse
const callSettings = new CometChatCalls.CallSettingsBuilder()
  .enableDefaultLayout(true)
  .showRecordingButton(true)           // Show recording button
  .startRecordingOnCallStart(true)     // Auto-start recording
  .setCallListener(callListener)
  .build();

Manual Recording Control

For custom UI implementations, use these methods to control recording programmatically:

Start Recording

CometChatCalls.startRecording();

Stop Recording

CometChatCalls.stopRecording();

Accessing Recordings

Recordings are available in the CometChat Dashboard:
1

Navigate to Calls

Go to the Calls section in your dashboard
2

Find the Call

Locate the call you want to access recordings for
3

View Recordings

Click the three-dot menu icon and select “View Recordings”

Next Steps