Record call sessions for later playback, compliance, or training purposes. Recordings are stored server-side and can be accessed through the CometChat dashboard.
Recording must be enabled for your CometChat app. Contact support if you need to enable this feature.
Auto-Start Recording
Configure recording to start automatically when the session begins:
const callSettings = {
autoStartRecording: true,
// ... other settings
};
await CometChatCalls.joinSession(callToken, callSettings, container);
Manual Recording Control
Start Recording
Begin recording during an active call:
CometChatCalls.startRecording();
Stop Recording
Stop the current recording:
CometChatCalls.stopRecording();
Recording Events
Recording Started
Fired when recording begins:
CometChatCalls.addEventListener("onRecordingStarted", () => {
console.log("Recording started");
// Update UI to show recording indicator
});
Recording Stopped
Fired when recording ends:
CometChatCalls.addEventListener("onRecordingStopped", () => {
console.log("Recording stopped");
// Update UI to hide recording indicator
});
Participant Recording Events
Monitor when other participants start or stop recording:
CometChatCalls.addEventListener("onParticipantStartedRecording", (participant) => {
console.log(`${participant.name} started recording`);
});
CometChatCalls.addEventListener("onParticipantStoppedRecording", (participant) => {
console.log(`${participant.name} stopped recording`);
});
By default, the recording button is hidden. To show it:
const callSettings = {
hideRecordingButton: false,
// ... other settings
};
Intercept recording button clicks for custom behavior:
CometChatCalls.addEventListener("onRecordingToggleButtonClicked", () => {
console.log("Recording button clicked");
// Add custom logic like confirmation dialogs
});
Accessing Recordings
Recordings are available through:
- The CometChat Dashboard under your app’s call logs
- The Call Logs API to retrieve call details including recording URLs