diff --git a/lang/main.json b/lang/main.json index e7db6dd7a05c..a753d0a7de9d 100644 --- a/lang/main.json +++ b/lang/main.json @@ -739,6 +739,7 @@ "connectedOneMember": "{{name}} joined the meeting", "connectedThreePlusMembers": "{{name}} and many others joined the meeting", "connectedTwoMembers": "{{first}} and {{second}} joined the meeting", + "connectionFailed": "Connection failed. Please try again later!", "dataChannelClosed": "Video quality may be impaired", "dataChannelClosedDescription": "The bridge channel is down and thus video quality may be limited to its lowest setting.", "dataChannelClosedDescriptionWithAudio": "The bridge channel is down and thus disruptions to audio and video may occur.", diff --git a/react/features/base/conference/middleware.any.ts b/react/features/base/conference/middleware.any.ts index 72e1ae70deb4..91e56b78e6d3 100644 --- a/react/features/base/conference/middleware.any.ts +++ b/react/features/base/conference/middleware.any.ts @@ -16,8 +16,9 @@ import { IStore } from '../../app/types'; import { removeLobbyChatParticipant } from '../../chat/actions.any'; import { openDisplayNamePrompt } from '../../display-name/actions'; import { isVpaasMeeting } from '../../jaas/functions'; -import { showErrorNotification } from '../../notifications/actions'; +import { showErrorNotification, showNotification } from '../../notifications/actions'; import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants'; +import { INotificationProps } from '../../notifications/types'; import { hasDisplayName } from '../../prejoin/utils'; import { stopLocalVideoRecording } from '../../recording/actions.any'; import LocalRecordingManager from '../../recording/components/Recording/LocalRecordingManager'; @@ -419,6 +420,16 @@ function _connectionFailed({ dispatch, getState }: IStore, next: Function, actio } } + if (error.name === JitsiConnectionErrors.CONFERENCE_REQUEST_FAILED) { + const notificationProps = { + customActionNameKey: [ 'dialog.rejoinNow' ], + customActionHandler: [ () => dispatch(reloadNow()) ], + descriptionKey: 'notify.connectionFailed' + } as INotificationProps; + + dispatch(showNotification(notificationProps, NOTIFICATION_TIMEOUT_TYPE.STICKY)); + } + const result = next(action); _removeUnloadHandler(getState); diff --git a/react/features/base/connection/actions.any.ts b/react/features/base/connection/actions.any.ts index 6f060bdac1f3..534f9c9d3ef7 100644 --- a/react/features/base/connection/actions.any.ts +++ b/react/features/base/connection/actions.any.ts @@ -4,7 +4,7 @@ import { IReduxState, IStore } from '../../app/types'; import { conferenceLeft, conferenceWillLeave, redirect } from '../conference/actions'; import { getCurrentConference } from '../conference/functions'; import { IConfigState } from '../config/reducer'; -import JitsiMeetJS, { JitsiConnectionErrors, JitsiConnectionEvents } from '../lib-jitsi-meet'; +import JitsiMeetJS, { JitsiConnectionEvents } from '../lib-jitsi-meet'; import { parseURLParams } from '../util/parseURLParams'; import { appendURLParam, @@ -288,8 +288,7 @@ export function _connectInternal(id?: string, password?: string) { credentials, details, name: err, - message, - recoverable: err === JitsiConnectionErrors.CONFERENCE_REQUEST_FAILED ? false : undefined + message })); reject(err); diff --git a/react/features/base/lib-jitsi-meet/functions.any.ts b/react/features/base/lib-jitsi-meet/functions.any.ts index a71cf72ba93f..a0a2feccb503 100644 --- a/react/features/base/lib-jitsi-meet/functions.any.ts +++ b/react/features/base/lib-jitsi-meet/functions.any.ts @@ -97,8 +97,7 @@ export function isFatalJitsiConnectionError(error: Error | string | ConnectionFa } return ( - error === JitsiConnectionErrors.CONFERENCE_REQUEST_FAILED - || error === JitsiConnectionErrors.CONNECTION_DROPPED_ERROR + error === JitsiConnectionErrors.CONNECTION_DROPPED_ERROR || error === JitsiConnectionErrors.OTHER_ERROR || error === JitsiConnectionErrors.SERVER_ERROR); }