Introduction

You can record the audio of all users in a call and save it on the client, just like using the recording function on your cell phone to record a call and save it for future replays.

Agora's Native SDK supports audio recording at the client. You can record the audio of all users in a channel and generate one recording file with the following format:

  • wav: Large file (lossless compression)
  • aac: Smaller file (lossy compression)

Implementation

    // Start audio recording.
    rtcEngine.startAudioRecording(
        "path/to/file",              // Local path of the recording file
                                     //  specified by the user, 
                                     // including the filename and format.
        AUDIO_RECORDING_QUALITY_HIGH // Audio quality of the recording: 
                                     // LOW, MEDIUM, and HIGH.
    );

    // Stop audio recording.
    rtcEngine.stopAudioRecording();

API Methods

Considerations

  • Only after joining a channel can you start recording the audio.
  • Client audio recording is automatically stopped once you leave the channel.