{"id":4143,"date":"2021-11-09T15:43:00","date_gmt":"2021-11-09T07:43:00","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4143"},"modified":"2022-04-08T13:57:28","modified_gmt":"2022-04-08T05:57:28","slug":"session-extension-closure","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/web-toolkit\/session-extension-closure\/","title":{"rendered":"Session Extension &#038; Closure: Web 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>A Room is restricted in duration with a duration value in minutes defined during Room Creation. The count begins as soon as the first user joins the session.  <\/p>\n\n\n\n<p>The <code>EnxRoom.extendConferenceDuration()<\/code> allows you to extend the duration of the session beyond the configured duration. The extension process is explained below:<\/p>\n\n\n\n<ol><li>An \u201cExtension Window\u201d opens 10 minutes prior to the 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 <code>extendConferenceDuration()<\/code>. Once triggered, the Extension Window is closed, thus preventing further extension requests.<\/li><li>If extension is not triggered by any user, the final \u201cExtension Window\u201d opens 5 minutes prior to the scheduled closure of the Session. All connected users are notified with an Event. <\/li><li>The session can get extended by 10 to 30 minutes. So, the extended period may vary. <\/li><li>There is no restriction on the number of times a session can be extended. Once extended, Step 1-4 gets repeated. <\/li><\/ol>\n\n\n\n<p><strong>Method:&nbsp;<\/strong><code>EnxRoom.extendConferenceDuration( Callback )<\/code> <\/p>\n\n\n\n<p><strong>Parameters<\/strong>:<\/p>\n\n\n\n<ul><li><code>Callback<\/code> \u2013 JSON Object with a result of the request and if extended it carries another key <code>extendedTime<\/code> to show how many minutes extension has been granted. <\/li><\/ul>\n\n\n\n<p><strong>Notification Event:&nbsp;<\/strong> <\/p>\n\n\n\n<p><code>conference-remaining-duration<\/code> \u2013 Notification to everyone in the Room when an Extension Window is open. It carries a JSON to show how many minutes are left to the scheduled session closure.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Listen to event to know when Extension Window is open\nroom.addEventListener('conference-remaining-duration', function(event) {\n        var timeLeft = event.message.timeLeft;\n\n        \/\/ Show UI to all usersr or to participant to\n\t\/\/ trigger EXTEND by caling method.\n});\n\n\/\/ To extend Session\nroom.extendConferenceDuration( function(message) {\n    if(message.result== 0)\n    {\tvar extended_minutes = message.extendedTime;\n    }\n});<\/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&nbsp;<code>EnxRoom.destroy()<\/code>&nbsp;method allows the Moderator to conclude an ongoing session.<\/p>\n\n\n\n<p><strong>Class:<\/strong> <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method:<\/strong>&nbsp;<code>EnxRoom.destroy()<\/code><\/p>\n\n\n\n<p><strong>Event Notification: <\/strong><\/p>\n\n\n\n<p><strong><code>room-d<\/code><\/strong><code>isconnected<\/code> &#8211;&nbsp;Notification to all users in the Room when the session is destroyed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">room.destroy();\n \n\/\/ All users are notified disconnection with reason\nroom.addEventListener(\"room-disconnected\", function(event) {\n \/\/ Event may be processed to know reason\n if (event.message.cause.msg === 'disconnected-by-moderator') {\n \/\/ Show message to user\n }\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=\"..\/disconnect-user\/\"><\/a><a href=\"\/developer\/video-api\/client-api\/web-toolkit\/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\/\">Participant Role Switch<\/a> \u2192 <\/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 A Room is restricted in duration with a duration value in minutes defined during Room Creation. The count begins as soon as the first user joins the session. The EnxRoom.extendConferenceDuration() allows you to extend the duration of the session beyond the configured duration. The extension process is explained below: An \u201cExtension Window\u201d opens 10 minutes prior to the scheduled closure of&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 Extend Session Destroy Session Extend Session A Room is restricted in duration with a duration value in minutes defined during Room Creation. The count begins as soon as the first user joins the session. The EnxRoom.extendConferenceDuration() allows you to extend the duration of the session beyond the configured duration. The extension process&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4143"}],"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=4143"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4143\/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=4143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}