operateMicrophone method

void operateMicrophone()

Implementation

void operateMicrophone() {
  final isMicrophoneOpened = mediaState.isMicrophoneOpened.value;
  if (!isMicrophoneOpened) {
    unMuteLocalAudio();
    openLocalMicrophone();
    return;
  }
  final isMuted = mediaState.isMicrophoneMuted.value;
  if (isMuted) {
    unMuteLocalAudio();
  } else {
    muteLocalAudio();
  }
}