Table of Contents
Mute / Unmute Audio in a Stream
The EnxStream.muteSelfAudio()
method is used to mute/unmute Audio of the Local Stream.
Class: EnxStream
Methods: public void muteSelfAudio( isMute )
Parameter: isMute
– true to mute and false to unmute Audio.
Callbacks:
onRemoteStreamAudioMute
– Notification to everyone in the Room when a user mutes self Audio.onRemoteStreamAudioUnMute
– Notification to everyone in the Room when a user unmutes self Audio.onAudioEvent
– Acknowledgment to the user when self Audio is muted/unmuted.
localStream.muteSelfAudio(true); // To mute audio of local stream localStream.muteSelfAudio(true); // To unmute audio of local stream // To self. Audio is muted/unmuted. public void onAudioEvent(JSONObject json) { // json { "result":0, "msg": "Audio Off" } // json { "result":0, "msg": "Audio On" } } // To all. Audio muted by Remote user. public void onRemoteStreamAudioMute(JSONObject json) { // json {"result":0, "msg":"User muted audio", "clientId": "XXX" } } // To all. Audio unmuted by Remote user. public void onRemoteStreamAudioUnMute(JSONObject json) { // json {"result":0, "msg":"User unmuted audio", "clientId": "XXX" } }
Error Codes / Exceptions
Code | Description |
---|---|
5058 | Repeated muteSelfAudio() call made while a previous mute request is in process. |
5059 | Repeated muteSelfAudio() call made while a previous unmute request is in process. |
5060 | Repeated muteSelfAudio() call made after Audio has been muted already. |
5061 | Trying to unmute Audio without muting it first. |
5062 | Unable to unmute Audio as Audio hard-muted by the Moderator. |
Mute / Unmute Video in a Stream
The EnxStream.muteSelfVideo()
method is used to mute/unmute Video of the Local Stream.
Class: EnxStream
Methods: public void muteSelfVideo( isMute )
Parameter: isMute
– true to mute, false to unmute Video.
Callbacks:
onRemoteStreamVideoMute
– Notification to everyone in the Room when a user mutes self Video.onRemoteStreamVideoUnMute
– Notification to everyone in the Room when a user unmutes self Video.onVideoEvent
– Acknowledgment to the user when self Video is muted/unmuted.
localStream.muteSelfVideo(true); // To mute video of local stream localStream.muteSelfVideo(false); // To unmute video of local stream // To self. Video is muted/unmuted. public void onVideoEvent(JSONObject json) { // json { "result":0, "msg": "Video Off" } // json { "result":0, "msg": "Video On" } } // To all. Video muted by Remote user public void onRemoteStreamVideoMute(JSONObject json) { // json {"result":0, "msg":"User muted video", "clientId": "XXX" } } // To all. Video unmuted by Remote user public void onRemoteStreamVideoUnMute(JSONObject json) { // json {"result":0, "msg":"User unmuted video", "clientId": "XXX" } }
Error Codes / Exceptions
Code | Description |
---|---|
5020 | Unable to process muteSelfVideo() when the user has denied Camera permission. |
5071 | Repeated muteSelfVideo() call made while a previous request is in process. |
5063 | Repeated muteSelfVideo() call made after Video has been muted already. |
5064 | Repeated muteSelfVideo() call made after Video has been unmuted already. |
5065 | When the user tries to unmute Video without muting it first. Non-Contextual Method call. |
5066 | Unable to unmute Video as Video hard-muted by the Moderator. |
5070 | Unable to unmute Video in Audio-only call mode. |