Table of Contents

Hard Mute / Unmute Room

The EnxRoom.hardMute() method allows the Moderator to hard-mute the Room where all the participants are muted. A new participant joining a Room in a hard-mute state would also be muted by default. The right to unmute a hard-mute Room lies only with the Moderator and participants cannot unmute their Local Streams either. The EnxRoom.hardUnMute() method is used to put the Room off a hard-mute state.

Class: EnxRoom

Methods:

  • public void hardMute() – No Parameter required.
  • public void hardUnMute() – No Parameter required.

Observer: public void setMuteRoomObserver(EnxMuteRoomObserver-Object)

Callbacks:

  • onReceivedMuteRoom  – Notification to all the participants in the Room when Room is hard-muted.
  • onReceivedUnMuteRoom  – Notification to all the participants in the Room when Room is put off hard- mute state.
  • onMutedRoom  – Acknowledgment to the Moderator when Room is hard-muted.
  • onUnMutedRoom – Acknowledgment to the Moderator when Room is put off hard-mute state.
// Initiate Hard-Mute Observer to receive Callbacks 
room.setMuteRoomObserver(this); 

room.hardMute(); // To hard-mute Room
room.hardUnMute(); // To hard-unmute Room

public void onMutedRoom(JSONObject jsonobject){
 // You hard-muted Room
}

public void onUnMutedRoom(JSONObject jsonobject){
 // You hard-unuted Room
}

public void onReceivedMuteRoom(JSONObject jsonobject){
 // Room is hard-muted - to all
} 

public void onReceivedUnMuteRoom(JSONObject jsonobject){
 // Room is hard-unmuted - to all
}

Error Codes & Exceptions

CodeDescription
5001Unauthorized Access. When a user with a participant role invokes hardMute().
5002Unauthorized Access. When a user with a participant role invokes hardUnMute().
5037Repeated hardMute() request while the previous request is in process.
5038Invalid hardMute() request While the Room is already in a hard-mute state.
5039Invalid hardUnMuteRoom() request while the Room is NOT in a hard-mute state.
5040Repeated hardUnMuteRoom() request while the previous request is in process.

Hard Mute / Unmute Participant

The EnxStream.hardMuteAudio() and EnxStream.hardMuteVideo() methods allow the Moderator to hard-mute a Participant’s Audio and Video Streams respectively. The affected Participant cannot unmute their Audio or Video Streams. The Moderator can unmute the Participant’s Audio or Video Streams using EnxStream.hardUnMuteAudio() and EnxStream.hardUnMuteVideo() methods respectively.

Note: For Android SDK v2.1.3+, refer to the section below for more details.

Class: EnxStream

Methods:

  • public void hardMuteAudio(String clientId)
  • public void hardMuteVideo(String clientId)
  • public void hardUnMuteAudio(String clientId)
  • public void hardUnMuteVideo(String clientId)

Parameters:

clientId – The user whose audio/video needs to be hard muted/unmuted.

Callbacks:

  • onHardMutedAudio – Notification to the affected participant when their Audio is hard-muted.
  • onHardUnMutedAudio – Notification to the affected participant when their Audio is lifted off the hard-mute state.
  • onHardMutedVideo – Notification to the affected participant when their Video is hard-muted.
  • onHardUnMutedVideo – Notification to the affected participant when their Video is lifted off the hard-mute state.
  • onReceivedHardMuteAudio – Notification to all the participants in the Room when a user’s Audio is hard-muted.
  • onReceivedHardUnMuteAudio – Notification to all the participants in the Room when a user’s Audio is lifted off the hard-mute state.
  • onReceivedHardMuteVideo – Notification to all the participants in the Room when a user’s Video is hard-muted.
  • onReceivedHardUnMuteVideo – Notification to all the participants in the Room when a user’s Video is lifted off the hard-mute state.
stream.hardMuteAudio(clientId); // To hard-mute user's Audio Stream
stream.hardUnMuteAudio(clientId); // To hard-unmute user's Audio Stream

public void onHardMutedAudio(JSONObject jsonobject){
 // Your audio is hard-muted
}

public void onHardUnMutedAudio(JSONObject jsonobject){
 // Your audio is hard-unmuted
}

public void onReceivedHardUnMuteAudio(JSONObject jsonObject){
 // A User's audio is hard-unmuted - to all
} 

public void onReceivedHardMuteAudio(JSONObject jsonobject){
 // A User's audio is hardmuted - to all
}

// Video Hard-Mute/Hard-Unmute will used in the same way as Audio.  

Error Codes & Exceptions

CodeDescription
5009Unauthorized Access. When a user with a participant role invokes hardMuteAudio().
5010Unauthorized Access. When a user with a participant role invokes hardUnMuteAudio().
5011Unauthorized Access. When a user with a participant role invokes hardMuteVideo().
5012Unauthorized Access. When a user with a participant role invokes hardUnMuteVideo().

Hard Mute / Unmute Participant

Availability: Android SDK v2.1.3+

The EnxRoom.hardMuteUserAudio() and EnxRoom.hardMuteUserVideo() methods allow the Moderator to hard-mute a Participant’s Audio and Video Streams respectively. The affected Participant cannot unmute their Audio or Video Streams. The Moderator can unmute the Participant’s Audio or Video Streams using EnxRoom.hardUnMuteUserAudio() and EnxRoom.hardUnMuteUserVideo() methods respectively.

Class: EnxRoom

Methods:

  • public void hardMuteUserAudio(String clientId)
  • public void hardMuteUserVideo(String clientId)
  • public void hardUnMuteUserAudio(String clientId)
  • public void hardUnMuteUserVideo(String clientId)

Parameters:

clientId – The user whose audio/video needs to be hard muted/unmuted.

Callbacks:

  • onAckHardMuteUserAudio – Notification to the affected participant when their Audio is hard-muted.
  • onAckHardunMuteUserAudio – Notification to the affected participant when their Audio is lifted off the hard-mute state.
  • onAckHardMuteUserVideo – Notification to the affected participant when their Video is hard-muted.
  • onAckHardUnMuteUserVideo – Notification to the affected participant when their Video is lifted off the hard-mute state.
  • onReceivedHardMuteAudio – Notification to all the participants in the Room when a user’s Audio is hard-muted.
  • onReceivedHardUnMuteAudio – Notification to all the participants in the Room when a user’s Audio is lifted off the hard-mute state.
  • onReceivedHardMuteVideo – Notification to all the participants in the Room when a user’s Video is hard-muted.
  • onReceivedHardUnMuteVideo – Notification to all the participants in the Room when a user’s Video is lifted off the hard-mute state.
enxRoom.hardMuteUserAudio(clientId);        // To hard-mute user's Audio Stream
enxRoom.hardUnMuteUserAudio(clientId);     // To hard-unmute user's Audio Stream

public void onAckHardMuteUserAudio(JSONObject jsonobject){
 // Your audio is hard-muted
}

public void onAckHardunMuteUserAudio(JSONObject jsonobject){
 // Your audio is hard-unmuted
}

public void onReceivedHardUnMuteAudio(JSONObject jsonObject){
 // A User's audio is hard-unmuted - to all
} 

public void onReceivedHardMuteAudio(JSONObject jsonobject){
 // A User's audio is hardmuted - to all
}

// Video Hard-Mute/Hard-Unmute will used in the same way as Audio.