{"id":5012,"date":"2021-12-21T17:57:24","date_gmt":"2021-12-21T09:57:24","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=5012"},"modified":"2025-02-20T20:25:32","modified_gmt":"2025-02-20T12:25:32","slug":"destroy-session","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/destroy-session\/","title":{"rendered":"Session Extension &#038; Closure: React Native SDK &#8211; Video API"},"content":{"rendered":"\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#extend-session\">Extend Session<\/a><\/li><li><a href=\"#destroy-session\">Destroy Session<\/a> <\/li><\/ul>\n\n\n\n<a name=\"extend-session\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Extend Session<\/h2>\n\n\n\n<p>Each Room is defined with duration value in minutes. This duration  defines total length  of single session and it\u2019s counted from the time  first user joins the session. Portal drops the session when  the  session duration elapses. <\/p>\n\n\n\n<p>For practical reasons, a session may need to get extended. Therefore,  Portal allows users to extend a session duration at run-time. Follow  explanation given below:<\/p>\n\n\n\n<ol><li>An \u201cExtension Window\u201d opens 10 minutes prior to the end of  scheduled closure of the Session. All connected users are notified with  an Event.<\/li><li>Any user can trigger extension of the Session by calling a Method. If any user trigger extension, the Extension Window is  closed. This prevents portal to process further Extension Request  within the same Extension Window.<\/li><li>If extension is not triggered  by any user, another \u201cExtension Window\u201d opens 5 minutes prior to the end  of scheduled closure of the Session. This is the final Extension  Window.  All connected users are notified with an Event. <\/li><li>Portal processes extension request and extends the session by 10 to 30 minutes. So, the extended period may vary. <\/li><li>There is no cap on number of times you may extend your Session. Once extended, Step 1-4 will get repeated. <\/li><\/ol>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Method:&nbsp;<\/strong><code>extendConferenceDuration()<\/code>  \u2013 To trigger extension by any user, available only when an Extension Window is open.<\/p>\n\n\n\n<p><strong>Callbacks:&nbsp;<\/strong> <\/p>\n\n\n\n<ul><li><code>extendConferenceDuration<\/code>  &nbsp;\u2013 Notification when an Extension Window is open. It bring a JSON  to show how many minutes is left to scheduled session closure.<\/li><li><code>conferencessExtended <\/code>&#8211; Notification when Session gets extended.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Listen to event to know when Extension Window is open\nwindow.EnxRtc.addEventListner(\"onConferenceRemainingDuration\", function (data) {}); \/\/ Extend Session\n\nwindow.EnxRtc.extendConferenceDuration(); \/\/ Extend Session\n\n\/\/ Listen when Session is extended\nwindow.EnxRtc.addEventListner(\"onConferencessExtended\", function (data) {});<\/pre>\n\n\n\n<a name=\"destroy-session\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Destroy Session<\/h2>\n\n\n\n<p>The <code>Enx.destroy()<\/code>&nbsp;method allows the Moderator to conclude an ongoing session.  <\/p>\n\n\n\n<p><strong>Method:<\/strong>&nbsp;<code>Enx.destroy()<\/code> &#8211; No Parameter required.<\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>ackDestroy<\/code> &#8211;&nbsp;Acknowledgment to the Moderator when the session is destroyed.<\/li><li><code>roomDisconnected<\/code> <code>-<\/code> Notification to all users in the Room when the session is destroyed.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.destroy().  \nackDestroy:event=&gt;{\n    \/\/ Moderator is acknowledged that session is destroyed\n              }\nroomDisconnected:event=&gt;{\n     \/\/ Notification to all users in the Room when the session is destroyed.\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>5116<\/td><td>Unauthorized Access. When a user with <code>participant<\/code> role invokes <code>destroy()<\/code>.<\/td><\/tr><\/tbody><\/table><\/figure>\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=\"..\/disconnect-user\/\"><\/a><a href=\"..\/disconnect-user\/\">Disconnect User<\/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 Extend Session Destroy Session Extend Session Each Room is defined with duration value in minutes. This duration defines total length of single session and it\u2019s counted from the time first user joins the session. Portal drops the session when the session duration elapses. For practical reasons, a session may need to get extended. Therefore, Portal allows users to extend a session duration at run-time. Follow explanation given&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 Extend Session Destroy Session Extend Session Each Room is defined with duration value in minutes. This duration defines total length of single session and it\u2019s counted from the time first user joins the session. Portal drops the session when the session duration elapses. For practical reasons, a session may need to get&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5012"}],"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=5012"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5012\/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=5012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}