toggleMuteFrame()

toggleMuteFrame(newState?: boolean)

Toggles the mute state of the video conference frame. If frame is not muted it will become muted and vice-versa. Note that this doesn't affect other (remote) users. The method behaves like muting or unmuting your browser tab - affects only local user.

//This will toggle the frame mute state
sambaFrame.toggleMuteFrame();

//This will mute the frame, equivalent to sambaFrame.muteFrame();
sambaFrame.toggleMuteFrame(true); 

//This will unmute the frame, equivalent to sambaFrame.unmuteFrame();
sambaFrame.toggleMuteFrame(false);

Sample use cases:

  • Having the conference loaded in the background and muted from user until a certain event happens. At some point you will want to unmute it, so user can participate.

Last updated