{"id":4306,"date":"2021-11-16T15:25:00","date_gmt":"2021-11-16T07:25:00","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4306"},"modified":"2022-04-08T18:27:41","modified_gmt":"2022-04-08T10:27:41","slug":"hard-muting","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/hard-muting\/","title":{"rendered":"Hard Muting: Android SDK &#8211; Video API"},"content":{"rendered":"\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#hard-mute-unmute-room\">Hard Mute \/ Unmute Room<\/a><\/li><li><a href=\"#hard-mute-unmute-participants\">Hard Mute \/ Unmute Participants<\/a><\/li><\/ul>\n\n\n\n<a name=\"hard-mute-unmute-room\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Hard Mute \/ Unmute Room<\/h2>\n\n\n\n<p>The&nbsp;<code>EnxRoom.hardMute()<\/code>&nbsp;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 <code>EnxRoom.hardUnMute()<\/code> method is used to put the Room off a hard-mute state. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li> <code>public void hardMute()<\/code> &#8211; No Parameter required.<\/li><li> <code>public void hardUnMute()<\/code> &#8211; No Parameter required.<\/li><\/ul>\n\n\n\n<p><strong>Observer<\/strong>:  <code>public void setMuteRoomObserver(EnxMuteRoomObserver-Object)<\/code> <\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onReceivedMuteRoom<\/code>&nbsp; &#8211; Notification to all the participants in the Room when Room is hard-muted.<\/li><li><code>onReceivedUnMuteRoom<\/code>&nbsp; &#8211; Notification to all the participants in the Room when Room is put off hard- mute state.<\/li><li><code>onMutedRoom<\/code>&nbsp; &#8211; Acknowledgment to the Moderator when Room is hard-muted.<\/li><li><code>onUnMutedRoom<\/code> &#8211; Acknowledgment to the Moderator when Room is put off hard-mute state.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Initiate Hard-Mute Observer to receive Callbacks \nroom.setMuteRoomObserver(this); \n\nroom.hardMute(); \/\/ To hard-mute Room\nroom.hardUnMute(); \/\/ To hard-unmute Room\n\npublic void onMutedRoom(JSONObject jsonobject){\n \/\/ You hard-muted Room\n}\n\npublic void onUnMutedRoom(JSONObject jsonobject){\n \/\/ You hard-unuted Room\n}\n\npublic void onReceivedMuteRoom(JSONObject jsonobject){\n \/\/ Room is hard-muted - to all\n} \n\npublic void onReceivedUnMuteRoom(JSONObject jsonobject){\n \/\/ Room is hard-unmuted - to all\n}<\/pre>\n\n\n\n<p><strong>Error Codes &amp; Exceptions<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5001<\/td><td>Unauthorized Access. When a user with a <code>participant<\/code> role invokes <code>hardMute()<\/code>.<\/td><\/tr><tr><td>5002<\/td><td>Unauthorized Access. When a user with a <code>participant<\/code> role invokes <code>hardUnMute()<\/code>.<\/td><\/tr><tr><td>5037<\/td><td>Repeated <code>hardMute() <\/code>request while the previous request is in process.<\/td><\/tr><tr><td>5038<\/td><td>Invalid <code>hardMute()<\/code> request While the Room is already in a hard-mute state. <\/td><\/tr><tr><td>5039<\/td><td>Invalid <code>hardUnMuteRoom()<\/code> request while the Room is NOT in a hard-mute state.<\/td><\/tr><tr><td>5040<\/td><td>Repeated <code>hardUnMuteRoom() <\/code>request while the previous request is in process.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<a name=\"hard-mute-unmute-participants\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Hard Mute \/ Unmute Participant<\/h2>\n\n\n\n<p>The <code>EnxStream.hardMuteAudio()<\/code> and <code>EnxStream.hardMuteVideo()<\/code> methods allow the Moderator to hard-mute a Participant&#8217;s Audio and Video Streams respectively. The affected Participant cannot unmute their Audio or Video Streams. The Moderator can unmute the Participant&#8217;s Audio or Video Streams using <code>EnxStream.hardUnMuteAudio()<\/code> and <code>EnxStream.hardUnMuteVideo()<\/code> methods respectively. <\/p>\n\n\n\n<p> <strong>Note<\/strong>: For Android SDK v2.1.3+, refer to the <a href=\"#hard-mute-unmute-participant\">section<\/a> below for more details. <\/p>\n\n\n\n<p><strong>Class: <\/strong><code>EnxStream<\/code><\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li> <code>public void hardMuteAudio(String clientId)<\/code><\/li><li> <code>public void hardMuteVideo(String clientId)<\/code> <\/li><li> <code>public void hardUnMuteAudio(String clientId)<\/code> <\/li><li> <code>public void hardUnMuteVideo(String clientId)<\/code><\/li><\/ul>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<p><code>clientId&nbsp;<\/code>\u2013 The user whose audio\/video needs to be hard muted\/unmuted.<\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onHardMutedAudio<\/code> &#8211; Notification to the affected participant when their Audio is hard-muted.<\/li><li><code>onHardUnMutedAudio<\/code> &#8211; Notification to the affected participant when their Audio is lifted off the hard-mute state.<\/li><li><code>onHardMutedVideo<\/code> &#8211;  Notification to the affected participant when their Video is hard-muted.<\/li><li><code>onHardUnMutedVideo<\/code> &#8211; Notification to the affected participant when their Video is lifted off the hard-mute state.<\/li><li><code>onReceivedHardMuteAudio<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Audio is hard-muted.<\/li><li><code>onReceivedHardUnMuteAudio<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Audio is lifted off the hard-mute state.<\/li><li><code>onReceivedHardMuteVideo<\/code> &#8211;  Notification to all the participants in the Room when a user&#8217;s Video is hard-muted.<\/li><li><code>onReceivedHardUnMuteVideo<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Video is lifted off the hard-mute state.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">stream.hardMuteAudio(clientId); \/\/ To hard-mute user's Audio Stream\nstream.hardUnMuteAudio(clientId); \/\/ To hard-unmute user's Audio Stream\n\npublic void onHardMutedAudio(JSONObject jsonobject){\n \/\/ Your audio is hard-muted\n}\n\npublic void onHardUnMutedAudio(JSONObject jsonobject){\n \/\/ Your audio is hard-unmuted\n}\n\npublic void onReceivedHardUnMuteAudio(JSONObject jsonObject){\n \/\/ A User's audio is hard-unmuted - to all\n} \n\npublic void onReceivedHardMuteAudio(JSONObject jsonobject){\n \/\/ A User's audio is hardmuted - to all\n}\n\n\/\/ Video Hard-Mute\/Hard-Unmute will used in the same way as Audio.  <\/pre>\n\n\n\n<p><strong>Error Codes &amp; Exceptions<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5009<\/td><td>Unauthorized Access. When a user with a <code>participant<\/code> role invokes <code>hardMuteAudio()<\/code>.<\/td><\/tr><tr><td>5010<\/td><td>Unauthorized Access. When a user with a <code>participant<\/code> role invokes <code>hardUnMuteAudio()<\/code>.<\/td><\/tr><tr><td>5011<\/td><td>Unauthorized Access. When a user with a <code>participant<\/code> role invokes <code>hardMuteVideo()<\/code>.<\/td><\/tr><tr><td>5012<\/td><td>Unauthorized Access. When a user with <code>a participant<\/code> role invokes <code>hardUnMuteVideo()<\/code>.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<a name=\"hard-mute-unmute-participant\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Hard Mute \/ Unmute Participant<\/h3>\n\n\n\n<p> Availability:  Android SDK v2.1.3+ <\/p>\n\n\n\n<p>The <code>EnxRoom.hardMuteUserAudio()<\/code> and <code>EnxRoom.hardMuteUserVideo()<\/code> methods allow the Moderator to hard-mute a Participant&#8217;s Audio and Video Streams respectively. The affected Participant cannot unmute their Audio or Video Streams. The Moderator can unmute the Participant&#8217;s Audio or Video Streams using <code>EnxRoom.hardUnMuteUserAudio()<\/code> and <code>EnxRoom.hardUnMuteUserVideo()<\/code> methods respectively. <\/p>\n\n\n\n<p><strong>Class: <\/strong><code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li> <code>public void hardMuteUserAudio(String clientId)<\/code> <\/li><li> <code>public void hardMuteUserVideo(String clientId)<\/code><\/li><li> <code>public void hardUnMuteUserAudio(String clientId)<\/code> <\/li><li> <code>public void hardUnMuteUserVideo(String clientId)<\/code> <\/li><\/ul>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<p><code>clientId&nbsp;<\/code>\u2013 The user whose audio\/video needs to be hard muted\/unmuted.<\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onAckHardMuteUserAudio<\/code> &#8211; Notification to the affected participant when their Audio is hard-muted.<\/li><li><code>onAckHardunMuteUserAudio<\/code> &#8211; Notification to the affected participant when their Audio is lifted off the hard-mute state.<\/li><li><code>onAckHardMuteUserVideo<\/code> &#8211; Notification to the affected participant when their Video is hard-muted.<\/li><li><code>onAckHardUnMuteUserVideo<\/code> &#8211; Notification to the affected participant when their Video is lifted off the hard-mute state.<\/li><li><code>onReceivedHardMuteAudio<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Audio is hard-muted.<\/li><li><code>onReceivedHardUnMuteAudio<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Audio is lifted off the hard-mute state.<\/li><li><code>onReceivedHardMuteVideo<\/code> &#8211;  Notification to all the participants in the Room when a user&#8217;s Video is hard-muted.<\/li><li><code>onReceivedHardUnMuteVideo<\/code> &#8211; Notification to all the participants in the Room when a user&#8217;s Video is lifted off the hard-mute state.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">enxRoom.hardMuteUserAudio(clientId);        \/\/ To hard-mute user's Audio Stream\nenxRoom.hardUnMuteUserAudio(clientId);     \/\/ To hard-unmute user's Audio Stream\n\npublic void onAckHardMuteUserAudio(JSONObject jsonobject){\n \/\/ Your audio is hard-muted\n}\n\npublic void onAckHardunMuteUserAudio(JSONObject jsonobject){\n \/\/ Your audio is hard-unmuted\n}\n\npublic void onReceivedHardUnMuteAudio(JSONObject jsonObject){\n \/\/ A User's audio is hard-unmuted - to all\n} \n\npublic void onReceivedHardMuteAudio(JSONObject jsonobject){\n \/\/ A User's audio is hardmuted - to all\n}\n\n\/\/ Video Hard-Mute\/Hard-Unmute will used in the same way as Audio.  <\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/recording\/\" data-type=\"page\">Record Session<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/room-entry-restriction\/#lock-unlock-room\"> <\/a><a href=\"..\/room-entry-restriction\/#lock-unlock-room\">Lock \/ Unlock Room<\/a>  \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents Hard Mute \/ Unmute Room Hard Mute \/ Unmute Participants Hard Mute \/ Unmute Room The&nbsp;EnxRoom.hardMute()&nbsp;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()&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3740,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"Table of Contents Hard Mute \/ Unmute Room Hard Mute \/ Unmute Participants Hard Mute \/ Unmute Room The&nbsp;EnxRoom.hardMute()&nbsp;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&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4306"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4306"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4306\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3740"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}