startAudioRecording method Null safety

Future<void> startAudioRecording(
  1. String filePath,
  2. AudioSampleRateType sampleRate,
  3. AudioRecordingQuality quality
)

Starts an audio recording on the client.

The SDK allows recording during a call. After successfully calling this method, you can record the audio of all the users in the channel and get an audio recording file.

Supported formats of the recording file are as follows:

  • .wav: Large file size with high fidelity.
  • .aac: Small file size with low fidelity.

Note

Parameter filePath Absolute file path (including the suffixes of the filename) of the recording file. The string of the file name is in UTF-8. For example, /sdcard/emulated/0/audio/aac.

Parameter sampleRate Sample rate (Hz) of the recording file. See AudioSampleRateType for supported values.

Parameter quality The audio recording quality. See AudioRecordingQuality.

Implementation

@override
@deprecated
Future<void> startAudioRecording(String filePath,
    AudioSampleRateType sampleRate, AudioRecordingQuality quality) {
  return _invokeMethod('startAudioRecording', {
    'filePath': filePath,
    'sampleRate': AudioSampleRateTypeConverter(sampleRate).value(),
    'quality': AudioRecordingQualityConverter(quality).value(),
  });
}