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 a hard-mute state will also be inaudible.

To put room into hard mute state, you may use window.EnxRtc.hardMute() method; and to disable you may use window.EnxRtc.hardUnMute() method. All participants of the room are notified with   onReceivedMuteRoom and onReceivedUnMuteRoom listeners; whereas the Moderator is notified with onMutedRoom and onUnMutedRoom event listeners respectively.

Methods:

  • hardMute() – to hard mute room
  • hardUnMute() – to hard unmute room

Callbacks:

  • onReceivedMuteRoom  – To all participants on hard-muting Room
  • onReceivedUnMuteRoom  – To all participants on hard-unmuting Room
  • onMutedRoom  – To notify Moderator that Room is hard-muted
  • onUnMutedRoom – To notify Moderator that Room is hard-unmuted
// To hard-mute Room
window.EnxRtc.hardMute();

// Add Event Listeners
// Moderator is acknowledged that Room has been muted.
window.EnxRtc.addEventListner("onHardMuted", function
(data)
{
console.log(JSON.stringify(data.data));
});
// All Participants are notified that Room has been muted.
window.EnxRtc.addEventListner("onReceivedHardMute",
function (data)
{
console.log(JSON.stringify(data.data));
});

// To hard-unmute Room
window.EnxRtc.hardUnMute();

// Add Event Listeners
// Moderator is acknowledged that Room has been unmuted.
window.EnxRtc.addEventListner("onHardUnMuted", function
console.log(JSON.stringify(data.data));
(data)
{});
// All Participants are notified that Room has been unmuted.
window.EnxRtc.addEventListner("onReceivedHardUnMute",
function (data)
{
console.log(JSON.stringify(data.data));
});