Table of Contents
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 “Extension Window” opens 10 minutes prior to the scheduled closure of the Session. All connected users are notified with an event.
- Any user can trigger extension of the Session by calling
extendConferenceDuration()
. Once triggered, the Extension Window is closed, thus preventing further extension requests. - If extension is not triggered by any user, the final “Extension Window” opens 5 minutes prior to the scheduled closure of the Session. All connected users are notified with an Event.
- The session can get extended by 10 to 30 minutes. So, the extended period may vary.
- There is no restriction on the number of times a session can be extended. Once extended, Step 1-4 gets repeated.
Method: EnxRoom.extendConferenceDuration( Callback )
Parameters:
Callback
– JSON Object with a result of the request and if extended it carries another keyextendedTime
to show how many minutes extension has been granted.
Notification Event:
conference-remaining-duration
– 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.
// Listen to event to know when Extension Window is open room.addEventListener('conference-remaining-duration', function(event) { var timeLeft = event.message.timeLeft; // Show UI to all usersr or to participant to // trigger EXTEND by caling method. }); // To extend Session room.extendConferenceDuration( function(message) { if(message.result== 0) { var extended_minutes = message.extendedTime; } });
Destroy Session
The EnxRoom.destroy()
method allows the Moderator to conclude an ongoing session.
Class: EnxRoom
Method: EnxRoom.destroy()
Event Notification:
room-d
isconnected
– Notification to all users in the Room when the session is destroyed.
room.destroy(); // All users are notified disconnection with reason room.addEventListener("room-disconnected", function(event) { // Event may be processed to know reason if (event.message.cause.msg === 'disconnected-by-moderator') { // Show message to user } });