Introduction

You can record the audio of all the users in a call and save it on the client for future replays.

The Agora Native SDK supports recording the audio of all the users in a channel and saves the recording into one file in the following formats:

  • WAV: Large file (lossless compression)
  • AAC: Small 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

  • Start the recording after joining a channel.
  • The recording automatically stops if the local user leaves the channel.