> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Recording

> CometChat Calling SDK v4 - Stable Release - Recording for Flutter

This section will guide you to implement call recording feature for the voice and video calls.

## Implementation

Once you have decided to implement [Ringing](/calls/v4/flutter/ringing) or [Call Session](/calls/v4/flutter/call-session) 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 [Ringing](/calls/v4/flutter/ringing) or [Call Session](/calls/v4/flutter/call-session).

A basic example of how to make changes to implement recording for a direct/default call:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CallSettings callSettings= (CallSettingsBuilder()
    ..defaultLayout = true
    ..showCallRecordButton = true //Show recording button
    ..listener = this //CometChatCallsEventsListener
    ).build();

    CometChatCalls.startSession(generatedToken, callSettings, onSuccess: (Widget? callingWidget){
    debugPrint("Success");
    }, onError: (CometChatCallsException e){	  
    debugPrint("Error: $e");
    });
    ```
  </Tab>
</Tabs>

## Settings for call recording

The `CallSettings`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 and 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                                                        | Description                                                                                                                                                                          |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `showCallRecordButton(boolean showCallRecordButton)`           | If set to `true` it displays the Recording button in the button Layout. if set to `false` it hides the Recording button in the button Layout. **Default value = false**              |
| `startRecordingOnCallStart(boolean startRecordingOnCallStart)` | If set to `true` call recording will start as soon as the call is started. if set to `false` call recording will not start as soon as the call is started. **Default value = false** |

### Start Recording

You can use the startRecording() method to start call recording.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatCalls.startRecording(onSuccess: (success) {
    debugPrint("Success $success");
    }, onError: (error) {
    debugPrint("Error $error");
    });
    ```
  </Tab>
</Tabs>

### Stop Recording

You can use the stopRecording() method to stop call recording.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatCalls.stopRecording(onSuccess: (success) {
    debugPrint("Success $success");
    }, onError: (error) {
    debugPrint("Error $error");
    });
    ```
  </Tab>
</Tabs>
