fix(conference): disconnect on VIDEOBRIDGE_NOT_AVAILABLE error

Will disconnect on ConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE.
Show the same message when either JVB is not available or Jicofo
disconnects.
This commit is contained in:
paweldomas 2016-10-06 13:30:00 -05:00
parent 469dee36ee
commit 229a3b4418
3 changed files with 14 additions and 17 deletions

View File

@ -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:

View File

@ -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.",

View File

@ -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,