Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(conference): disconnect on VIDEOBRIDGE_NOT_AVAILABLE error

paweldomas229a3b441894
diff --git a/conference.js b/conference.js
index cd2eef4c25..00c129799b 100644
--- a/conference.js
+++ b/conference.js
@@ -329,10 +329,6 @@ class ConferenceConnector {
}
break;
- case ConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE:
- APP.UI.notifyBridgeDown();
- break;
-
// not enough rights to create conference
case ConferenceErrors.AUTHENTICATION_REQUIRED:
// schedule reconnect to check if someone else created the room
@@ -367,6 +363,10 @@ class ConferenceConnector {
}
break;
+ // FIXME FOCUS_DISCONNECTED is confusing event name.
+ // What really happens there is that the library is not ready yet,
+ // because Jicofo is not available, but it is going to give
+ // it another try.
case ConferenceErrors.FOCUS_DISCONNECTED:
{
let [focus, retrySec] = params;
@@ -375,8 +375,12 @@ class ConferenceConnector {
break;
case ConferenceErrors.FOCUS_LEFT:
+ case ConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE:
+ // FIXME the conference should be stopped by the library and not by
+ // the app. Both the errors above are unrecoverable from the library
+ // perspective.
room.leave().then(() => connection.disconnect());
- APP.UI.notifyFocusLeft();
+ APP.UI.notifyVideoConferencingNotAvailable();
break;
case ConferenceErrors.CONFERENCE_MAX_USERS:
diff --git a/lang/main.json b/lang/main.json
index 0c6d1ac734..7600f1539b 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -202,8 +202,7 @@
"detectext": "Error when trying to detect desktopsharing extension.",
"failtoinstall": "Failed to install desktop sharing extension",
"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!",
+ "serviceUnavailableMsg": "The video conferencing service is currently unavailable. Please try again later!",
"maxUsersLimitReached": "The limit for maximum number of participants in the conference has been reached. The conference is full. Please try again later!",
"lockTitle": "Lock failed",
"lockMessage": "Failed to lock the conference.",
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index a8f542d017..a2b6d1f73c 100644
--- a/modules/UI/UI.js
+++ b/modules/UI/UI.js
@@ -195,13 +195,6 @@ UI.notifyConferenceDestroyed = function (reason) {
messageHandler.openDialog(title, reason, true, {}, () => false);
};
-/**
- * Notify user that Jitsi Videobridge is not accessible.
- */
- UI.notifyBridgeDown = function () {
- messageHandler.showError("dialog.error", "dialog.bridgeUnavailable");
-};
-
/**
* Show chat error.
* @param err the Error
@@ -1114,14 +1107,15 @@ UI.notifyFocusDisconnected = function (focus, retrySec) {
};
/**
- * Notify user that focus left the conference so page should be reloaded.
+ * Notify the user that the video conferencing service is badly broken and
+ * the page should be reloaded.
*/
-UI.notifyFocusLeft = function () {
+UI.notifyVideoConferencingNotAvailable = function () {
let title = APP.translation.generateTranslationHTML(
'dialog.serviceUnavailable'
);
let msg = APP.translation.generateTranslationHTML(
- 'dialog.jicofoUnavailable'
+ 'dialog.serviceUnavailableMsg'
);
messageHandler.openDialog(
title,