Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Load config.js only when the room is known

Saúl Ibarra Corretgé18d1572dab6f
diff --git a/react/features/app/actions.js b/react/features/app/actions.js
index 9049adbbd9..962d21978f 100644
--- a/react/features/app/actions.js
+++ b/react/features/app/actions.js
@@ -168,6 +168,14 @@ export function appWillUnmount(app) {
* @returns {Promise<Object>}
*/
function _loadConfig({ contextRoot, host, protocol, room }) {
+ // XXX As the mobile/React Native app does not employ config on the
+ // WelcomePage, do not download config.js from the deployment when
+ // navigating to the WelcomePage - the perceived/visible navigation will be
+ // faster.
+ if (!room && typeof APP === 'undefined') {
+ return Promise.resolve();
+ }
+
/* eslint-disable no-param-reassign */
protocol = protocol.toLowerCase();
diff --git a/react/features/base/config/actions.js b/react/features/base/config/actions.js
index a609c5ca5f..086d4f663e 100644
--- a/react/features/base/config/actions.js
+++ b/react/features/base/config/actions.js
@@ -14,7 +14,7 @@ import { SET_CONFIG } from './actionTypes';
* config: Object
* }}
*/
-export function setConfig(config: Object) {
+export function setConfig(config: Object = {}) {
return {
type: SET_CONFIG,
config