Direct Video Call - mute option

Hi,
I have a question:

I have “Direct call” with Video between 2 users. I would like to add “Mute” Button, where user can mute himself.
Is there method to mute / unmute audio when using video call?

Hi @developer,

Yes, there is a method to mute and unmute microphones in the Calls SDK. Please see the following doc page here: https://sendbird.com/docs/calls/v1/javascript/guides/direct-call#2-handle-an-active-call-3-audio

Thanks @Ian_Wright

Yes, that is working correctly! It’s properly handling muting audio in voice or video calls.
For future reference - here is my final code:

    if (this.state.displayEnd) {
      button2 = (
          <MIconButton
              className="btn--control u-m2"
              aria-label="Control"
              onClick={() => this.muteCall()}
          >
            {this.state.isMuted ? <VolumeOffIcon/> : <VolumeUpIcon/>}
          </MIconButton>
      )
    }

and the method:

  muteCall(){
    this.setState({isMuted: !this.state.isMuted},() => {

      if(this.state.isMuted) {
        this.state.call.muteMicrophone();
      } else {
        this.state.call.unmuteMicrophone();
      }

    });
  }