cancelRecord abstract method
Cancel record audio file.
Available since: 1.0.0
Description: Interrupt recording audio file. After calling this API, recording will be stopped, and the local file will be deleted internally by the SDK.
Use case: When you need to stop recording early during the recording process and do not need to send a voice message, you can call this API to cancel the recording.
When to call: startRecord Recording is taking effect.
Related APIs: When this API is called to cancel recording, the SDK will throw the onRecorderCancelled
notification. Developers can clean up related resources and update UI display based on this notification.
Caution: After canceling 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> cancelRecord();