requestToggleAudio()
(userId: string, shouldMute?: boolean)
Requests toggle of a remote user's microphone. The target user's id is provided as a parameter. As an optional second parameter you can specify a concrete wanted state for the remote user's microphone. In case it is not specified, then the microphone will be toggled - if it is enabled, then it will become muted and vice-versa - if muted, then the remote user will be asked to enable it.
You cannot forcefully unmute a remote user, because that can easily become a privacy concern. You can only request a remote user to unmute and then the remote user will accept or deny the request.
Sample use case: Have a custom participants panel in your integration and want moderators to be able to toggle or set the remote user's microphone state.
This method is a combination of requestMute and requestUnmute functionality.
Last updated