0

Hi guys i'm trying to create a button that disables my microphone in ws-chime, i followed the documentation to the letter only that when i click on the button nothing seems to happen.

 const { muted, toggleMute } = useToggleLocalMute();
<button onClick={toggleMute}>
          {muted ? "Unmute myself" : "Mute myself"}
        </button>
Nicola
  • 31
  • 1
  • 2

1 Answers1

0

I could simulate that problem and searching on the internet I could find this post on github related to this problem.

I tried to implement what was suggested there but didn't work for me, so I decided to work with the const meetingManager = useMeetingManager();

By using that, I was able to mute/unmute by calling

await meetingManager.audioVideo?.realtimeUnmuteLocalAudio();

await meetingManager.audioVideo?.realtimeMuteLocalAudio();

I don't know if it's the best solution but that worked for me until they update their documentation as mentioned in the post on github.

Maturano
  • 951
  • 4
  • 15
  • 42