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 reload regression
Ilya Daynatovichb409c8cc2fa0
diff --git a/react/features/base/connection/actions.web.js b/react/features/base/connection/actions.web.jsindex 3082cbaad3..9ffe5e2ec9 100644--- a/react/features/base/connection/actions.web.js+++ b/react/features/base/connection/actions.web.js@@ -9,6 +9,7 @@ import UIEvents from '../../../../service/UI/UIEvents';import { SET_DOMAIN } from './actionTypes';import { appNavigate } from '../../app';+import { setUnsupportedBrowser } from '../../unsupported-browser';declare var APP: Object;@@ -34,13 +35,6 @@ export function connect() {// XXX For web based version we use conference initialization logic// from the old app (at the moment of writing).return APP.conference.init({ roomName: room }).then(() => {- // If during the conference initialization was defined that browser- // doesn't support WebRTC then we should define which route- // to render.- if (APP.unsupportedBrowser) {- dispatch(appNavigate(room));- }-if (APP.logCollector) {// Start the LogCollector's periodic "store logs" taskAPP.logCollector.start();@@ -82,6 +76,25 @@ export function connect() {APP.UI.hideRingOverLay();APP.API.notifyConferenceLeft(APP.conference.roomName);logger.error(err);++ dispatch(setUnsupportedBrowser(err));++ // If during the conference initialization was defined that+ // browser doesn't support WebRTC then we should define+ // which route to render.+ dispatch(appNavigate(room));++ // Force reinitialization of the conference if WebRTC is ready.+ if (err.webRTCReadyPromise) {+ err.webRTCReadyPromise.then(() => {+ // Setting plugin required flag to false because+ // it's already been installed.+ dispatch(setUnsupportedBrowser({+ isPluginRequired: false+ }));+ dispatch(appNavigate(room));+ });+ }});};}diff --git a/react/features/base/util/interceptComponent.js b/react/features/base/util/interceptComponent.jsindex f21d46d508..533f6e4223 100644--- a/react/features/base/util/interceptComponent.js+++ b/react/features/base/util/interceptComponent.js@@ -16,6 +16,7 @@ declare var interfaceConfig: Object;* or not.** @private+ * @param {Object} state - Object containing current Redux state.* @returns {ReactElement|void}* @type {Function[]}*/@@ -27,6 +28,7 @@ const _RULES = [* app even if the browser supports the app (e.g. Google Chrome with* WebRTC support on Android).*+ * @param {Object} state - Redux state of the app.* @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then* we should intercept existing component by UnsupportedMobileBrowser.*/@@ -40,14 +42,17 @@ const _RULES = [: NoMobileApp);}},- () => {- if (APP.unsupportedBrowser) {- const { isOldBrowser } = APP.unsupportedBrowser;+ state => {+ const {+ isOldBrowser,+ isPluginRequired+ } = state['features/unsupported-browser'];- if (isOldBrowser) {- return UnsupportedDesktopBrowser;- }+ if (isOldBrowser) {+ return UnsupportedDesktopBrowser;+ }+ if (isPluginRequired) {return PluginRequiredBrowser;}}diff --git a/react/features/unsupported-browser/actionTypes.js b/react/features/unsupported-browser/actionTypes.jsindex 599fa4d946..55676c6c27 100644--- a/react/features/unsupported-browser/actionTypes.js+++ b/react/features/unsupported-browser/actionTypes.js@@ -16,3 +16,14 @@ import { Symbol } from '../base/react';* }*/export const DISMISS_MOBILE_APP_PROMO = Symbol('DISMISS_MOBILE_APP_PROMO');++/**+ * The type of Redux action which signals to change information about+ * unsupported browser in Redux store.+ *+ * {+ * type: SET_UNSUPPORTED_BROWSER,+ * unsupportedBrowser: Object+ * }+ */+export const SET_UNSUPPORTED_BROWSER = Symbol('SET_UNSUPPORTED_BROWSER');diff --git a/react/features/unsupported-browser/actions.js b/react/features/unsupported-browser/actions.jsindex c07c8a7d54..f732b17750 100644--- a/react/features/unsupported-browser/actions.js+++ b/react/features/unsupported-browser/actions.js@@ -1,4 +1,7 @@-import { DISMISS_MOBILE_APP_PROMO } from './actionTypes';+import {+ DISMISS_MOBILE_APP_PROMO,+ SET_UNSUPPORTED_BROWSER+} from './actionTypes';/*** Returns a Redux action which signals that the UnsupportedMobileBrowser which@@ -19,3 +22,20 @@ export function dismissMobileAppPromo() {type: DISMISS_MOBILE_APP_PROMO};}++/**+ * Sets unsupported browser object.+ *+ * @param {Object} unsupportedBrowser - Object describing the unsupported+ * browser.+ * @returns {{+ * type: SET_UNSUPPORTED_BROWSER,+ * unsupportedBrowser: Object+ * }}+ */+export function setUnsupportedBrowser(unsupportedBrowser) {+ return {+ type: SET_UNSUPPORTED_BROWSER,+ unsupportedBrowser+ };+}diff --git a/react/features/unsupported-browser/reducer.js b/react/features/unsupported-browser/reducer.jsindex 72fc5393ad..92a442a269 100644--- a/react/features/unsupported-browser/reducer.js+++ b/react/features/unsupported-browser/reducer.js@@ -1,6 +1,9 @@import { ReducerRegistry } from '../base/redux';-import { DISMISS_MOBILE_APP_PROMO } from './actionTypes';+import {+ DISMISS_MOBILE_APP_PROMO,+ SET_UNSUPPORTED_BROWSER+} from './actionTypes';ReducerRegistry.register('features/unsupported-browser',@@ -21,6 +24,11 @@ ReducerRegistry.register(*/mobileAppPromoDismissed: true};+ case SET_UNSUPPORTED_BROWSER:+ return {+ ...state,+ ...action.unsupportedBrowser+ };}return state;