Table of Contents
Hard Mute / Unmute Room
Moderator may put the room in a hard-mute state when he wishes no-one else to be audible in the Room. Any new user who joins the room when the room is in hard-mute state will also be inaudible.
To put room into hard mute state, you may use Enx.hardMute()
method; and to disable you may use EnxRoom.hardUnmute()
method. Moderator of the room is notified with mutedAllUser
and unmutedAllUser
callbacks; whereas all Participants are notified with hardMutedAll
and hardUnmuteAllUser
callbacks respectively.
Methods:
-
Enx.hardMute()
– to hard mute room -
Enx.hardUnmute()
– to hard unmute room
Callbacks:
-
hardMutedAll
– To all participants on hard-muting Room -
hardUnmuteAllUser
– To all participants on hard-unmuting Room -
mutedAllUser
– To notify Moderator that Room is hard-muted -
unmutedAllUser
– To notify Moderator that Room is hard-unmuted
Enx.hardMute (); // To hard mute room // To Moderator - Room is hard muted mutedAllUser: event=>{ // event= { result: 0, msg : “room muted” } } // To Participants - Room is hard muted hardMutedAll :event =>{ // event= { msg : “Room is muted”, status: true } } Enx.hardUnmute (); // To hard un-mute room // To Moderator - Room is hard unmuted unMutedAllUser : event=>{ // event= { result: 0, msg : “room un-muted” } } // To Participants - Room is hard unmuted hardUnmuteAllUser :event =>{ // event= { msg : “Room is un-muted”, status: false } }
Hard Mute / Unmute Participant
Moderator may enforce hard-mute on any selected participant in the room. The affected participant will not be able to talk or may not be able to publish his video ntil the imposed state is lifted.
React Native Toolkit offers hard muting audio and force dropping the video of selected participant using Enx.hardMuteAudio()
and Enx.hardMuteVideo()
methods respectively. You may lift the enforced muting state of Audio or Video using Enx.hardUnMuteAudio() and Enx.hardUnMuteVideo) )
methods respectively. The affected participant is notified using related events, viz. onHardMutedAudio
, onHardUnMutedAudio
, onHardMutedVideo
and onHardUnMutedVide
. All participants are notified about the mute status of the affected participant using related events, viz. onReceivedHardMuteAudio
, onReceivedHardUnMuteAudio
, onReceivedHardMuteVideo
and onReceivedHardUnMuteVideo
.
Class: EnxStream
Methods:
-
Enx.hardMuteAudio(streamId, clientId)
– to hard mute audio -
Enx.hardMuteVideo(streamId,clientId)
– to hard mute video -
Enx.hardUnmuteAudio(streamId,clientId)
– to hard unmute audio -
Enx.hardUnmuteVideo(streamId,clientId)
– to hard unmute video
Callbacks:
-
receivedHardMutedAudio
– To the affected participant to notify about hard-muted audio -
receivedHardUnmutedAudio
– To the affected participant to notify about hard-unmuted audio -
receiveHardMuteVideo
– To the affected participant to notify about hard-muted video -
receiveHardUnmuteVideo
– To the affected participant to notify about hard-unmuted video -
hardMuteAudio
– To moderator to notify about user’s hard-muted audio -
hardMuteVideo
– To moderator to notify about user’s hard-unmuted audio -
hardVideoMute
– To moderator to notify about user’s hard-muted video -
hardVideoUnmute
– To moderator to notify about user’s hard-unmuted video
Enx.hardMuteAudio(streamId,clientId); // To hard mute user's audio // To Moderator: User's audio is hard muted hardMuteAudio : event=>{ // event = {result: 0 } } // To affected Participant: Your audio is hard muted receivedHardMutedAudio :event =>{ // { result: 0, clientId: "XXX", msg: "user audio hard muted" } } Enx.hardUnmuteAudio(streamId,clientId); // To hard unmute user's audio // To Moderator: User's audio is hard unmuted hardUnmuteAudio : event=>{ // event = {result: 0 } } // To affected Participant: Your audio is hard unmuted receivedHardUnmutedAudio :event =>{ // { result: 0, clientId: "XXX", msg: "user audio hard unmuted" } } // Similar coding for User's video mute/unmute