mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(connection): Shows notification instead of reload on conference request failed.
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
d45c108051
commit
d438292d2c
@@ -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.",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user