{"id":4630,"date":"2021-12-01T14:49:19","date_gmt":"2021-12-01T06:49:19","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4630"},"modified":"2022-04-08T19:57:35","modified_gmt":"2022-04-08T11:57:35","slug":"hard-muting","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/hard-muting\/","title":{"rendered":"Hard Muting: React Native 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>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.  <\/p>\n\n\n\n<p>To put room into hard mute state, you may use&nbsp;<code>Enx.hardMute()<\/code>&nbsp;method; and to disable you may use&nbsp;<code>EnxRoom.hardUnmute()&nbsp;<\/code>method. Moderator of the  room is notified with  <code>mutedAllUser <\/code> and   <code>unmutedAllUser<\/code> callbacks; whereas all Participants are notified with   <code>hardMutedAll<\/code> and  <code>hardUnmuteAllUser<\/code> callbacks respectively.  <\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li> <code>Enx.hardMute()<\/code> &#8211; to hard mute room<\/li><li> <code>Enx.hardUnmute()<\/code> &#8211; to hard unmute room<\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li> <code>hardMutedAll<\/code>  &#8211; To all participants on hard-muting Room<\/li><li> <code>hardUnmuteAllUser<\/code>  &#8211; To all participants on hard-unmuting Room<\/li><li> <code>mutedAllUser <\/code>  &#8211; To notify Moderator that Room is hard-muted<\/li><li> <code>unmutedAllUser<\/code>  &#8211; To notify Moderator that  Room is hard-unmuted<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.hardMute (); \/\/ To hard mute room\n\n\/\/ To Moderator - Room is hard muted \nmutedAllUser: event=&gt;{\n\t\/\/ event= { result: 0, msg : \u201croom muted\u201d }\n}\n\n\/\/ To Participants - Room is hard muted \nhardMutedAll :event =&gt;{\n\t\/\/ event= { msg : \u201cRoom is muted\u201d, status: true }\n}\n\nEnx.hardUnmute (); \/\/ To hard un-mute room\n\n\/\/ To Moderator - Room is hard unmuted \nunMutedAllUser : event=&gt;{\n\t\/\/ event= { result: 0, msg : \u201croom un-muted\u201d }\n}\n\n\/\/ To Participants - Room is hard unmuted \nhardUnmuteAllUser :event =&gt;{\n\t\/\/ event= { msg : \u201cRoom is un-muted\u201d, status: false }\n}<\/pre>\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>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.    <\/p>\n\n\n\n<p>React Native Toolkit offers hard muting audio and force dropping the video of selected participant using&nbsp; <code>Enx.hardMuteAudio()<\/code>&nbsp;and&nbsp;<code>Enx.hardMuteVideo()<\/code>&nbsp;&nbsp;methods respectively.  You may lift the enforced muting state of Audio or Video using   Enx.hardUnMuteAudio()&nbsp;  and   Enx.hardUnMuteVideo)&nbsp; <code>)<\/code> methods respectively. The affected participant is notified using related events, viz.   <code>onHardMutedAudio<\/code>,&nbsp;<code>onHardUnMutedAudio<\/code>,&nbsp;<code>onHardMutedVideo<\/code> and <code>onHardUnMutedVide<\/code>. All participants are notified about the mute status of the affected participant using related events, viz.  <code>onReceivedHardMuteAudio<\/code>,&nbsp;<code>onReceivedHardUnMuteAudio<\/code>,&nbsp;<code>onReceivedHardMuteVideo&nbsp;<\/code>and&nbsp;<code>onReceivedHardUnMuteVideo<\/code>.<\/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>Enx.hardMuteAudio(streamId, clientId) <\/code> &#8211; to hard mute audio<\/li><li> <code>Enx.hardMuteVideo(streamId,clientId)<\/code>  &#8211; to hard mute video<\/li><li> <code>Enx.hardUnmuteAudio(streamId,clientId)<\/code>&#8211; to hard unmute audio<\/li><li> <code>Enx.hardUnmuteVideo(streamId,clientId)<\/code>&nbsp;&#8211; to hard unmute video<\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li> <code>receivedHardMutedAudio<\/code> &#8211; To the affected participant to notify about hard-muted audio<\/li><li> <code>receivedHardUnmutedAudio<\/code> &#8211; To the affected participant to notify about hard-unmuted audio <\/li><li> <code>receiveHardMuteVideo<\/code>  &#8211;  To the affected participant to notify about hard-muted video<\/li><li> <code>receiveHardUnmuteVideo<\/code>  &#8211; To the affected participant to notify about hard-unmuted video<\/li><li> <code>hardMuteAudio<\/code>  &#8211; To moderator to notify about user&#8217;s hard-muted audio<\/li><li> <code>hardMuteVideo<\/code>  &#8211;  To moderator to notify about user&#8217;s hard-unmuted audio <\/li><li> <code>hardVideoMute <\/code>&#8211;   To moderator to notify about user&#8217;s hard-muted video<\/li><li> <code>hardVideoUnmute<\/code> &#8211;  To moderator to notify about user&#8217;s hard-unmuted video <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.hardMuteAudio(streamId,clientId);\t\/\/ To hard mute user's audio\n\n\/\/ To Moderator: User's audio is hard muted\nhardMuteAudio : event=&gt;{\n\t\/\/ event = {result: 0 }\n}\n\n\/\/ To affected Participant: Your audio is hard muted\nreceivedHardMutedAudio :event =&gt;{\n\t\/\/ { result: 0, clientId: \"XXX\", msg: \"user audio hard muted\" }\n}\n\nEnx.hardUnmuteAudio(streamId,clientId);\t\/\/ To hard unmute user's audio\n\n\/\/ To Moderator: User's audio is hard unmuted\nhardUnmuteAudio : event=&gt;{\n\t\/\/ event = {result: 0 }\n}\n\n\/\/ To affected Participant: Your audio is hard unmuted\nreceivedHardUnmutedAudio :event =&gt;{\n\t\/\/ { result: 0, clientId: \"XXX\", msg: \"user audio hard unmuted\" }\n}\n\n\/\/ Similar coding for User's video mute\/unmute\n<\/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\/\"><\/a><a href=\"..\/recording\/\">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> \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 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&nbsp;Enx.hardMute()&nbsp;method; and to disable you&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"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 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&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4630"}],"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=4630"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4630\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}