setAudioMode static method
void
setAudioMode(
- String setAudioMode, {
- required dynamic onSuccess(
- String onSuccess
- required dynamic onError(
- CometChatCallsException excep
Sets the audio mode.
setAudioMode
: The audio mode to set.onSuccess
: A callback function that is called when the audio mode is successfully set.onError
: A callback function that is called when an error occurs while setting the audio mode.
Example: CometChatCalls.setAudioMode("speakerphone", onSuccess: (message) { // The audio mode was successfully set to "speakerphone". }, onError: (error) { // An error occurred while setting the audio mode. }, );
Implementation
static void setAudioMode(String setAudioMode, {
required Function(String onSuccess) onSuccess,
required Function(CometChatCallsException excep) onError
}) {
CometchatcallsPluginPlatform.instance.setAudioMode(setAudioMode, onSuccess, onError);
}