{"id":4751,"date":"2021-12-06T21:04:52","date_gmt":"2021-12-06T13:04:52","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4751"},"modified":"2022-04-11T18:37:52","modified_gmt":"2022-04-11T10:37:52","slug":"room-entry-restriction","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/flutter-toolkit\/room-entry-restriction\/","title":{"rendered":"Room Entry Restriction: Flutter SDK &#8211; Video API"},"content":{"rendered":"\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#lock-unlock-room\">Lock \/ Unlock Room<\/a><\/li><li><a href=\"#allow-deny-room-entry\">Moderate Participant Entry to Session<\/a><\/li><\/ul>\n\n\n\n<a name=\"lock-unlock-room\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Lock \/ Unlock Room<\/h2>\n\n\n\n<p>Moderator may lock the Room forbidding any new person from joining the Session. To allow subsequent users to join session, Moderator need to unlock the Room.<\/p>\n\n\n\n<p>To put room into Lock State, you use&nbsp;<code>lockRoom()<\/code>&nbsp;method; and to unlock the Room you use&nbsp;<code>unLockRoom()&nbsp;<\/code>method.<\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li> <code>static Future&lt;void&gt; lockRoom()<\/code> \u2013 To lock Room<\/li><li> <code>static Future&lt;void&gt; unLockRoom()<\/code> &nbsp;\u2013 To unlock Room<\/li><\/ul>\n\n\n\n<p><strong>Event Listeners:<\/strong><\/p>\n\n\n\n<ul><li><code>onAckLockRoom:<\/code> To acknowledge moderator that the Room has been locked<\/li><li><code>onLockedRoom:<\/code>&nbsp;To notify all participants that the room has been locked<\/li><li><code>onAckUnLockRoom:<\/code>&nbsp;To acknowledge moderator that the Room has been unlocked<\/li><li><code>onUnLockedRoom:<\/code>&nbsp;To notify all participants that the room has been unlocked<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">EnxRtc.lockRoom();\t\/\/ To lock room\nEnxRtc.unLockRoom();\t\/\/ To unlock room\n\nEnxRtc.onAckUnLockRoom = (Map&lt;dynamic, dynamic&gt; map) {\n\t\/\/ Moderator is acknowledged that room has been locked \n};\n\nEnxRtc.onLockedRoom = (Map&lt;dynamic, dynamic&gt; map) {\n\t\/\/ Participants are notified that room has been locked\n};\n \nEnxRtc.onAckUnLockRoom = (Map&lt;dynamic, dynamic&gt; map) {\n      \/\/ Moderator is acknowledged that room has been unlocked \n};\n\nEnxRtc.onUnLockedRoom = (Map&lt;dynamic, dynamic&gt; map) {\n\t\/\/ Participants are notified that room has been unlocked\n};<\/pre>\n\n\n\n<a name=\"allow-deny-room-entry\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Moderate Participants&#8217; entry to a Session<\/h2>\n\n\n\n<p>In a&nbsp;knock-enabled Room,&nbsp;a user needs to wait until the Moderator grants them permission to join the Session. The&nbsp;<code>approveAwaitedUser()<\/code>&nbsp;method allows the Moderator to approve a user\u2019s entry and&nbsp;<code>denyAwaitedUser()<\/code>&nbsp;method is used to decline a user\u2019s entry to the Session.<\/p>\n\n\n\n<p><strong>Methods: <\/strong><\/p>\n\n\n\n<ul><li><code>static Future&lt;void&gt; approveAwaitedUser(String clientId)<\/code><\/li><li><code>static Future&lt;void&gt; denyAwaitedUser(String clientId)<\/code><\/li><\/ul>\n\n\n\n<p><strong>Parameter: <\/strong><\/p>\n\n\n\n<ul><li><code>clientId<\/code>: Client ID of the user awaiting the Moderator\u2019s approval.<\/li><\/ul>\n\n\n\n<p><strong>Event Notifications:<\/strong><\/p>\n\n\n\n<ul><li><code>onUserAwaited<\/code> &#8211; Notification to the Moderator when a user awaits their permission to join Room.<\/li><li><code>onRoomAwaited<\/code> &#8211; Notification to the user when they await Moderator\u2019s permission to join Room with { \u201cevent_type\u201d: \u201cknock\u201d } in the JSON Payload.<\/li><li><code>onAckForApproveAwaitedUser<\/code> &#8211; Acknowledgment to the Moderator when the user is granted permission to join Room.<\/li><li><code>onRoomConnected<\/code> &#8211; Notification to the user when the user is permitted to join Room.<\/li><li><code>onAckForDenyAwaitedUser<\/code> &#8211; Acknowledgment to the Moderator when the user is denied permission to join Room.<\/li><li><code>onRoomDisconnected<\/code> &#8211; Notification to the user along with a reason for denial when the user is denied access to the Room.<\/li><\/ul>\n\n\n\n<pre id=\"block-eeb618e0-3c31-4b34-9a09-b25a0d3ff11d\" class=\"wp-block-preformatted\">EnxRtc.approveAwaitedUser(clientId);     \/\/ method allows the Moderator to approve a user\u2019s entry\nEnxRtc.denyAwaitedUser(clientId);     \/\/ method is used to decline a user\u2019s entry to the Session\n\nEnxRtc.onAckForApproveAwaitedUser=(Map&lt;dynamic,dynamic&gt; map){\n \n};\nEnxRtc.onAckForDenyAwaitedUser=(Map&lt;dynamic,dynamic&gt; map){\n\n};\nEnxRtc.onRoomAwaited=(Map&lt;dynamic,dynamic&gt; map){\n\n};\nEnxRtc.onUserAwaited=(Map&lt;dynamic,dynamic&gt; map){\n\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=\"..\/hard-muting\/\">Hard Muting<\/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=\"..\/participant-role-switch\/\"><\/a><a href=\"..\/participant-role-switch\/\">Change Participant\u2019s Role<\/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 Lock \/ Unlock Room Moderate Participant Entry to Session Lock \/ Unlock Room Moderator may lock the Room forbidding any new person from joining the Session. To allow subsequent users to join session, Moderator need to unlock the Room. To put room into Lock State, you use&nbsp;lockRoom()&nbsp;method; and to unlock the Room you use&nbsp;unLockRoom()&nbsp;method. Methods: static Future&lt;void&gt; lockRoom() \u2013 To lock Room static Future&lt;void&gt; unLockRoom() &nbsp;\u2013 To&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3755,"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 Lock \/ Unlock Room Moderate Participant Entry to Session Lock \/ Unlock Room Moderator may lock the Room forbidding any new person from joining the Session. To allow subsequent users to join session, Moderator need to unlock the Room. To put room into Lock State, you use&nbsp;lockRoom()&nbsp;method; and to unlock the Room&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4751"}],"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=4751"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4751\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3755"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}