> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-agent-in-group-react-v6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Recording

> Use CometChat Calls SDK v5 recording on JavaScript to start, stop, access, and manage recordings for supported call sessions.

Record call sessions for later playback, compliance, or training purposes. Recordings are stored server-side and can be accessed through the CometChat dashboard.

<Warning>
  Recording must be enabled for your CometChat app. Contact support if you need to enable this feature.
</Warning>

## Auto-Start Recording

Configure recording to start automatically when the session begins:

```javascript theme={null}
const callSettings = {
  autoStartRecording: true,
  // ... other settings
};

await CometChatCalls.joinSession(callToken, callSettings, container);
```

## Manual Recording Control

### Start Recording

Begin recording during an active call:

```javascript theme={null}
CometChatCalls.startRecording();
```

### Stop Recording

Stop the current recording:

```javascript theme={null}
CometChatCalls.stopRecording();
```

## Recording Events

### Recording Started

Fired when recording begins:

```javascript theme={null}
CometChatCalls.addEventListener("onRecordingStarted", () => {
  console.log("Recording started");
  // Update UI to show recording indicator
});
```

### Recording Stopped

Fired when recording ends:

```javascript theme={null}
CometChatCalls.addEventListener("onRecordingStopped", () => {
  console.log("Recording stopped");
  // Update UI to hide recording indicator
});
```

### Participant Recording Events

Monitor when other participants start or stop recording:

```javascript theme={null}
CometChatCalls.addEventListener("onParticipantStartedRecording", (participant) => {
  console.log(`${participant.name} started recording`);
});

CometChatCalls.addEventListener("onParticipantStoppedRecording", (participant) => {
  console.log(`${participant.name} stopped recording`);
});
```

## Recording Button Visibility

By default, the recording button is hidden. To show it:

```javascript theme={null}
const callSettings = {
  hideRecordingButton: false,
  // ... other settings
};
```

## Listen for Recording Button Clicks

Intercept recording button clicks for custom behavior:

```javascript theme={null}
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](/calls/api/list-calls) to retrieve call details including recording URLs
