Description
I am leveraging the passive mute and unmute to moderate participant use of the audio functionality in my app. But when I call the mediaStream.muteAudio(userId) as a host when the participant is already muted the event is not fired.
Which Web Video SDK version?
Zoom Video SDK for Web version 1.9.8
To Reproduce(If applicable)
Steps to reproduce the behavior:
Join meeting as host and then as participant.
Mute audio as participant
Call the mediaStream.muteAudio(userId) where userId is the participant’s user id as the host.
Hi @vic.yang
Yes I am referring to the current-audio-change event, but the case where the source is the source === MutedSource.PassiveByMuteOne || source === MutedSource.PassiveByMuteAll.
I am using this for some form of moderation in my implementation.
But it happens that if the participant is already muted, then the event is not fired.
Yes. I want to prevent the participants from un-muting themselves unless the host un-mutes them which allows them to unmute themselves and speak. I have already implemented this and it works well if the participant was unmuted before I call the mediaStream.muteAudio(userId). But if the participant was muted when the method was triggered, then nothing is fired and this is not what we want.
I need the event to be fired in order to execute some business logic to prevent the participant from unmuting until the host permits again for participants to speak.
You can achieve this using the Command Channel feature in the Video SDK.
When the host needs to restrict participants from unmuting, the host sends a message to all participants, including future joiners, indicating the restriction on unmuting. You can choose a name for this message, for example, “restrict-unmute.”
On the participant’s side, if they receive the “restrict-unmute” message, they should restrict the user from calling the stream.unmuteAudio method. Conversely, if the host wants to lift the restriction, they can broadcast a message like “allow-unmute.”