Table of Contents

Extend Session

Each Room is defined with duration value in minutes. This duration defines total length of single session and it’s counted from the time first user joins the session. EnableX drops the session when the session duration elapses.

For practical reasons, a session may need to get extended. Therefore, EnableX allows users to extend a session duration at run-time. Follow explanation given below:

  1. An “Extension Window” opens 10 minutes prior to the end of scheduled closure of the Session. All connected users are notified with an Event.
  2. Any user can trigger extension of the Session by calling a Method. If any user trigger extension, the Extension Window is closed. This prevents EnableX to process further Extension Request within the same Extension Window.
  3. If extension is not triggered by any user, another “Extension Window” 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.
  4. EnableX processes extension request and extends the session by 10 to 30 minutes. So, the extended period may vary.
  5. There is no cap on number of times you may extend your Session. Once extended, Step 1-4 will get repeated.

Method: static Future<void> extendConferenceDuration() – To trigger extension by any user, available only when an Extension Window is open.

Notification Event: 

  • onConferenceRemainingDuration  – Event is received when an Extension Window is open. It bring a JSON to show how many minutes is left to scheduled session closure.
  • onConferencessExtended – Event to notify that the Session has been extended.
// Listen to event to know when Extension Window is open
EnxRtc.onConferenceRemainingDuration= (Map<dynamic, dynamic> map) {
};

EnxRtc.extendConferenceDuration(); // Extend Session

// Listen when Session is extended
EnxRtc.onConferencessExtended= (Map<dynamic, dynamic> map) {
};

Destroy Session

Moderator may wish to conclude an ongoing session by using using window.EnxRtc.destroy() method.

Method: destroy() – No Parameters are required

Event Listeners:

  • onAckDestroy – To acknowledge that the session has been destroyed
  • onRoomDisconnected – To notify all the users that the session is closed
// To destroy Room
window.EnxRtc.destroy();

// Add Event Listeners
// Moderator is acknowledged that Session has been destroyed.
window.EnxRtc.addEventListner("onAckDestroy", function (data)
{
console.log(JSON.stringify(data.data));
});

// Participants are notified that session is closed.
window.EnxRtc.addEventListner("onRoomDisConnected",
function (data)
{
console.log(JSON.stringify(data.data));
});