From 02ff54b6599cf3e90639460b9f74de42965e9fb5 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Tue, 15 Mar 2016 14:08:01 -0500 Subject: [PATCH] Implements dialog for max users error --- conference.js | 4 ++++ lang/main.json | 1 + modules/UI/UI.js | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/conference.js b/conference.js index 529a6c1aa8..9d58131640 100644 --- a/conference.js +++ b/conference.js @@ -258,6 +258,10 @@ class ConferenceConnector { APP.UI.notifyFocusLeft(); break; + case ConferenceErrors.CONFERENCE_MAX_USERS: + connection.disconnect(); + APP.UI.notifyMaxUsersLimitReached(); + break; default: this._handleConferenceFailed(err, ...params); } diff --git a/lang/main.json b/lang/main.json index 9c5792827b..f9128e92d3 100644 --- a/lang/main.json +++ b/lang/main.json @@ -146,6 +146,7 @@ "failedpermissions": "Failed to obtain permissions to use the local microphone and/or camera.", "bridgeUnavailable": "Jitsi Videobridge is currently unavailable. Please try again later!", "jicofoUnavailable": "Jicofo is currently unavailable. Please try again later!", + "maxUsersLimitReached": "The limit for maximum number of participants in the conference is already reached. The conference is full. Please try again later!", "lockTitle": "Lock failed", "lockMessage": "Failed to lock the conference.", "warning": "Warning", diff --git a/modules/UI/UI.js b/modules/UI/UI.js index e68113ff28..70644a2b17 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -732,6 +732,22 @@ UI.notifyConnectionFailed = function (stropheErrorMsg) { ); }; + +/** + * Notify user that max users limit is already reached. + */ +UI.notifyMaxUsersLimitReached = function () { + var title = APP.translation.generateTranslationHTML( + "dialog.error"); + + var message = APP.translation.generateTranslationHTML( + "dialog.maxUsersLimitReached"); + + messageHandler.openDialog( + title, message, true, {}, function (e, v, m, f) { return false; } + ); +}; + /** * Notify user that he was automatically muted when joned the conference. */