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(notifications): Adds a 60 secs timeout for bridge channel message. (#14690)
Jaya Allamsetty6682b52a1947
diff --git a/conference.js b/conference.jsindex af135e1cfc..3a524c55c9 100644--- a/conference.js+++ b/conference.js@@ -55,7 +55,7 @@ import {getConferenceOptions,sendLocalParticipant} from './react/features/base/conference/functions';-import { getReplaceParticipant } from './react/features/base/config/functions';+import { getReplaceParticipant, getSsrcRewritingFeatureFlag } from './react/features/base/config/functions';import { connect } from './react/features/base/connection/actions.web';import {checkAndNotifyForNewDevice,@@ -166,7 +166,6 @@ import { handleToggleVideoMuted } from './react/features/toolbox/actions.any';import { muteLocal } from './react/features/video-menu/actions.any';const logger = Logger.getLogger(__filename);-let room;/*@@ -1983,12 +1982,31 @@ export default {room.on(JitsiConferenceEvents.DATA_CHANNEL_CLOSED, ev => {- APP.store.dispatch(dataChannelClosed(ev.code, ev.reason));- APP.store.dispatch(showWarningNotification({- descriptionKey: 'notify.dataChannelClosedDescription',- titleKey: 'notify.dataChannelClosed',- uid: DATA_CHANNEL_CLOSED_NOTIFICATION_ID- }, NOTIFICATION_TIMEOUT_TYPE.STICKY));+ const state = APP.store.getState();+ const { dataChannelOpen } = state['features/base/conference'];+ const timeout = typeof dataChannelOpen === 'undefined' ? 15000 : 60000;++ // Show the notification only when the data channel connection doesn't get re-established in 60 secs if+ // it was already established at the beginning of the call, show it sooner otherwise. This notification+ // can be confusing and alarming to users even when there is no significant impact to user experience+ // if the the reconnect happens immediately.+ setTimeout(() => {+ const { dataChannelOpen: open } = APP.store.getState()['features/base/conference'];++ if (!open) {+ const descriptionKey = getSsrcRewritingFeatureFlag(state)+ ? 'notify.dataChannelClosedDescriptionWithAudio' : 'notify.dataChannelClosedDescription';+ const titleKey = getSsrcRewritingFeatureFlag(state)+ ? 'notify.dataChannelClosedWithAudio' : 'notify.dataChannelClosed';++ APP.store.dispatch(dataChannelClosed(ev.code, ev.reason));+ APP.store.dispatch(showWarningNotification({+ descriptionKey,+ titleKey,+ uid: DATA_CHANNEL_CLOSED_NOTIFICATION_ID+ }, NOTIFICATION_TIMEOUT_TYPE.STICKY));+ }+ }, timeout);});},diff --git a/lang/main.json b/lang/main.jsonindex 6d8a3d1bd2..19c0d0420b 100644--- a/lang/main.json+++ b/lang/main.json@@ -734,8 +734,10 @@"connectedOneMember": "{{name}} joined the meeting","connectedThreePlusMembers": "{{name}} and many others joined the meeting","connectedTwoMembers": "{{first}} and {{second}} joined the meeting",- "dataChannelClosed": "Video quality impaired",- "dataChannelClosedDescription": "The bridge channel has been disconnected and thus video quality is limited to its lowest setting.",+ "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.",+ "dataChannelClosedWithAudio": "Audio and video quality may be impaired","disabledIframe": "Embedding is only meant for demo purposes, so this call will disconnect in {{timeout}} minutes.","disabledIframeSecondary": "Embedding {{domain}} is only meant for demo purposes, so this call will disconnect in {{timeout}} minutes. Please use <a href='{{jaasDomain}}' rel='noopener noreferrer' target='_blank'>Jitsi as a Service</a> for production embedding!","disconnected": "disconnected",diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.tsindex c2ca5361d5..db1b3183cb 100644--- a/react/features/base/conference/reducer.ts+++ b/react/features/base/conference/reducer.ts@@ -18,6 +18,8 @@ import {CONFERENCE_TIMESTAMP_CHANGED,CONFERENCE_WILL_JOIN,CONFERENCE_WILL_LEAVE,+ DATA_CHANNEL_CLOSED,+ DATA_CHANNEL_OPENED,LOCK_STATE_CHANGED,P2P_STATUS_CHANGED,SET_ASSUMED_BANDWIDTH_BPS,@@ -35,6 +37,7 @@ import { isRoomValid } from './functions';const DEFAULT_STATE = {assumedBandwidthBps: undefined,conference: undefined,+ dataChannelOpen: undefined,e2eeSupported: undefined,joining: undefined,leaving: undefined,@@ -146,6 +149,7 @@ export interface IConferenceState {authRequired?: IJitsiConference;conference?: IJitsiConference;conferenceTimestamp?: number;+ dataChannelOpen?: boolean;e2eeSupported?: boolean;error?: Error;followMeEnabled?: boolean;@@ -219,6 +223,12 @@ ReducerRegistry.register<IConferenceState>('features/base/conference',case CONNECTION_WILL_CONNECT:return set(state, 'authRequired', undefined);+ case DATA_CHANNEL_CLOSED:+ return set(state, 'dataChannelOpen', false);++ case DATA_CHANNEL_OPENED:+ return set(state, 'dataChannelOpen', true);+case LOCK_STATE_CHANGED:return _lockStateChanged(state, action);