completeRecord abstract method
Complete record audio file.
Available since: 1.0.0
Description: Finish recording the audio file. After calling this API, the recording file will be generated in the file path passed in startRecord and saved.
Use case: After completing the recording, the developer can send the recording file as an IM message. For example, it is passed to ZIM's AudioMessage to send voice messages.
When to call: startRecord Recording is taking effect.
Related APIs: When this API is called and recording is successfully completed, the SDK throws the onRecorderCompleted
notification. Developers must receive this callback notification before sending voice messages.
Caution: If the developer does not call this API to end the recording while startRecord is in effect, the recording will still be completed and the file will be saved when the maximum recording duration of startRecord is reached. After completing the recording, the SDK will release the occupation of the audio device.
Restrictions: Recording-related APIs cannot be used at the same time as playback-related APIs. At the same time, only recording or playback can be performed inside the SDK.
Implementation
Future<void> completeRecord();