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

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

// Stop audio recording.
agoraKit.stopAudioRecording()
// Objective-C
// Start audio recording.
// Local path to the recording file specified by the user, including the filename and format.
// Audio quality of the recording: LOW, MEDIUM, and HIGH.
[agoraKit startAudioRecording:@"recording file path", quality: AgoraAudioRecordingQualityHigh];

// Stop audio recording.
[agoraKit stopAudioRecording];

API Reference

Considerations

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