{"id":4854,"date":"2021-12-10T15:51:25","date_gmt":"2021-12-10T07:51:25","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4854"},"modified":"2025-02-22T21:04:28","modified_gmt":"2025-02-22T13:04:28","slug":"session-extension-closure","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/cordova-toolkit\/session-extension-closure\/","title":{"rendered":"Session Extension &#038; Closure: Cordova\/Ionic 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>Notification Event:&nbsp;<\/strong> <\/p>\n\n\n\n<ul><li><code>onConferenceRemainingDuration<\/code>  &nbsp;\u2013 Event is received when an Extension Window is open. It bring a JSON  to show how many minutes is left to scheduled session closure.<\/li><li><code>onConferencessExtended <\/code>&#8211; Event to notify that the Session has been 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>Moderator may wish to conclude an ongoing session by using using&nbsp;<code>window.EnxRtc.destroy()<\/code>&nbsp;method.  <\/p>\n\n\n\n<p><strong>Method:<\/strong>&nbsp;<code>destroy()<\/code> &#8211; No Parameters are required<\/p>\n\n\n\n<p><strong>Event Listeners:<\/strong><\/p>\n\n\n\n<ul><li><code>onAckDestroy<\/code>&nbsp;&#8211; To acknowledge that the session has been destroyed<\/li><li><code>onRoomDisconnected<\/code> &#8211; To notify all the users that the session is closed<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ To destroy Room\nwindow.EnxRtc.destroy();\n\n\/\/ Add Event Listeners\n\/\/ Moderator is acknowledged that Session has been destroyed.\nwindow.EnxRtc.addEventListner(\"onAckDestroy\", function (data)\n{\nconsole.log(JSON.stringify(data.data));\n});\n\n\/\/ Participants are notified that session is closed.\nwindow.EnxRtc.addEventListner(\"onRoomDisConnected\",\nfunction (data)\n{\nconsole.log(JSON.stringify(data.data));\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=\"..\/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=\"..\/floor-access-control\/\">Lecture Mode<\/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":3719,"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\/4854"}],"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=4854"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4854\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3719"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}