{"id":4127,"date":"2021-11-09T13:39:17","date_gmt":"2021-11-09T05:39:17","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4127"},"modified":"2022-04-11T18:46:42","modified_gmt":"2022-04-11T10:46:42","slug":"hard-muting","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/web-toolkit\/hard-muting\/","title":{"rendered":"Hard Muting: Web SDK &#8211; Video SDK"},"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&nbsp;<code>EnxRoom.hardUnMute()<\/code>&nbsp;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>EnxRoom.hardMute(Callback)<\/code><\/li><li> <code>EnxRoom.hardUnmute(Callback) <\/code><\/li><\/ul>\n\n\n\n<p><strong>Event Notifications:<\/strong><\/p>\n\n\n\n<ul><li><code>hard-mute-room<\/code> &#8211; Notification to all the participants in the Room along with Moderator ID when Room is hard-muted.<\/li><li><code>hard-unmute-room<\/code> &#8211; Notification to all the participants in the Room along with Moderator ID when Room is put off hard- mute state.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Moderator hard-mutes room\nroom.hardMute(function (result, error) {\n \/* result JSON\n { \"result\": 0,\n \"msg\": \"Room is muted\"\n }\n *\/\n});\n\n\/\/ Moderator hard-unmutes room\nroom.hardUnmute(function (result, error) {\n \/*Result JSON\n { \"result\": 0,\n \"msg\": \"Room is un-muted\"\n }\n *\/\n});\n\n\/\/ Partipants are notifed on room being hard-muted\nroom.addEventListener(\"hard-mute-room\", function (res) {\n   \/\/ res.moderator = Moderator who hard-muted Room. \n});\n\n\/\/ Partipants are notifed on room being hard-unmuted\nroom.addEventListener(\"hard-unmute-room\", function (res) {\n \/\/ res.moderator = Moderator who hard-unmuted Room.  \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>The&nbsp;<code>EnxRoom.hardMuteUserAudio()<\/code>&nbsp;and&nbsp;<code> <code>EnxRoom<\/code> .hardMuteUserVideo()<\/code>&nbsp;methods allow the Moderator to hard-mute a Participant\u2019s Audio and Video Streams respectively. The affected Participant cannot unmute their Audio or Video Streams. The Moderator can unmute the Participant\u2019s Audio or Video Streams using&nbsp;<code> <code>EnxRoom<\/code> .hardUnMuteUserAudio()<\/code>&nbsp;and&nbsp;<code> <code>EnxRoom<\/code> .hardUnMuteUserVideo()<\/code>&nbsp;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>EnxRoom.hardMuteUserAudio(clientId, Callback)<\/code> <\/li><li> <code>EnxRoom.hardMuteUserVideo(clientId, Callback)<\/code> <\/li><li> <code>EnxRoom.hardUnmuteUserAudio(clientId, Callback)<\/code><\/li><li> <code>EnxRoom.hardUnmuteUserVideo(clientId, Callback)<\/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>Event Notifications:<\/strong><\/p>\n\n\n\n<ul><li><code>hardmute-user-audio<\/code> &#8211; Notification to the affected participant when their Audio is hard-muted.<\/li><li><code>hardunmute-user-audio<\/code> &#8211; Notification to the affected participant when their Audio is lifted off the hard-mute state. <\/li><li><code>hardmute-user-video<\/code> &#8211; Notification to the affected participant when their Video is hard-muted. <\/li><li><code>hardunmute-user-video<\/code> &#8211; Notification to the affected participant when their Video is lifted off the hard-mute state.<\/li><li><code>user-audio-muted<\/code> &#8211; Notification to all the participants in the Room when a user\u2019s Audio is hard-muted.<\/li><li><code>user-audio-unmuted<\/code> &#8211; Notification to all the participants in the Room when a user\u2019s Audio is lifted off the hard-mute state. <\/li><li><code>user-video-muted<\/code> &#8211; Notification to all the participants in the Room when a user\u2019s Video is hard-muted.  <\/li><li><code>user-video-unmuted<\/code> &#8211; Notification to all the participants in the Room when a user\u2019s Video is lifted off the hard-mute state.  <\/li><\/ul>\n\n\n\n<p>All the events message carry Moderator ID who hard-muted or hard-unmuted Audio\/Video of a Participant.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Hard mute User's audio     \nroom.hardMuteUserAudio(clientId, function(response) {\n     if (response.result === 0) {\n         \/\/ Success\n     }\n     else {      \n         \/\/ Failed\n     }\n});\n\n\/\/ Hard mute User's video*\/    \nroom.hardMuteUserVideo (clientId, function(response) {\n     if (response.result === 0) {\n         \/\/ Success\n     }\n     else {      \n         \/\/ Failed\n     }\n});\n\nroom.addEventListener('hardmute-user-audio', function(event) { \n     \/\/ Your audio is hard muted\n     \/\/ event.moderator = Moderator who hard-muted user's Audio.\n});\n\nroom.addEventListener('hardmute-user-video', function(event) {\n      \/\/ Your video is hard muted \n});\n\nroom.addEventListener('user-audio-muted', function(event) {      \n      \/\/ User's audio muted     \n      \/\/ Info about user event.stream.attributes\n}); \n\nroom.addEventListener('user-video-muted', function(event) {      \n      \/\/ User's video muted     \n      \/\/ Info about user event.stream.attributes\n});\n\n\/\/ Similarly you may code for hard unmute User's audio\/video  \n\/\/ using related methods and event notifications<\/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\/\">Record a 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\/\">Room Entry Restriction<\/a> \u2192 <\/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&nbsp;EnxRoom.hardUnMute()&nbsp;method is&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3724,"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\/4127"}],"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=4127"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4127\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3724"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}