Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(connection): Shows notification instead of reload on conference request failed.
damenchod438292d2c37
diff --git a/lang/main.json b/lang/main.jsonindex a6d29e0e02..64d9e202cf 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.tsindex 72e1ae70de..91e56b78e6 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.tsindex 6f060bdac1..534f9c9d3e 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.tsindex a71cf72ba9..a0a2feccb5 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);}