startAudioRecording abstract method

Future<int?> startAudioRecording(
  1. AudioRecordingConfig config
)

Starts recording audio communication, and generates the local file.

If you call this API before or after joining the room without internal audio capture, then the recording task can still begin but the data will not be recorded in the local files. Only when you call startAudioCapture to enable internal audio capture, the data will be recorded in the local files.

Return value:

  • 0: Success.
  • -2: Invalid parameters.
  • -3: Not valid in this SDK. Please contact the technical support.

Notes:

  • All audio effects are valid in the file. Mixed audio file is not included in the file.
  • You can call this API before and after joining the room. If this API is called before you join the room, you need to call stopAudioRecording to stop recording. If this API is called after you join the room, the recording task ends automatically. If you join multiple rooms, audio from all rooms are recorded in one file.
  • After calling the API, you'll receive RTCVideoEventHandler.onAudioRecordingStateUpdate.

Implementation

Future<int?> startAudioRecording(AudioRecordingConfig config);