mute method

void mute([
  1. bool audio = true,
  2. bool video = true
])

Mute

Implementation

void mute([bool audio = true, bool video = true]) {
  logger.debug('mute()');

  bool audioMuted = false, videoMuted = false;

  if (_audioMuted == false && audio) {
    audioMuted = true;
    _audioMuted = true;
    _toggleMuteAudio(true);
  }

  if (_videoMuted == false && video) {
    videoMuted = true;
    _videoMuted = true;
    _toggleMuteVideo(true);
  }

  if (audioMuted == true || videoMuted == true) {
    _onmute(audioMuted, videoMuted);
  }
}