setAudioMode static method

void setAudioMode(
  1. String setAudioMode,
  2. {required dynamic onSuccess(
    1. String onSuccess
    ),
  3. required dynamic onError(
    1. 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);
}