Skip to content

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

feat(App): remove obsolete config prop

Saúl Ibarra Corretgé79d51bc37986
diff --git a/react/config.js b/react/config.js
deleted file mode 100644
index 2097ed6231..0000000000
--- a/react/config.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* global config */
-
-// For legacy reasons, use jitsi-meet's global variable config.
-export default typeof config === 'object' ? config : undefined;
diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js
index 4c7ace4596..8225bb54ba 100644
--- a/react/features/app/components/AbstractApp.js
+++ b/react/features/app/components/AbstractApp.js
@@ -20,6 +20,11 @@ import {
declare var APP: Object;
+/**
+ * Default URL to be loaded if no other was specified using props.
+ */
+const DEFAULT_URL = 'https://meet.jit.si';
+
/**
* Base (abstract) class for main App component.
*
@@ -32,7 +37,14 @@ export class AbstractApp extends Component {
* @static
*/
static propTypes = {
- config: React.PropTypes.object,
+ /**
+ * Default URL to be loaded by the app when not in any room.
+ */
+ defaultUrl: React.PropTypes.string,
+
+ /**
+ * (Optional) Redux store for this app.
+ */
store: React.PropTypes.object,
/**
@@ -193,10 +205,9 @@ export class AbstractApp extends Component {
_createElement(component, props) {
/* eslint-disable no-unused-vars, lines-around-comment */
const {
- // Don't propagate the config prop(erty) because the config is
- // stored inside the Redux state and, thus, is visible to the
- // children anyway.
- config,
+ // The defaultUrl property was introduced to be consumed entirely by
+ // AbstractApp.
+ defaultUrl,
// Don't propagate the dispatch and store props because they usually
// come from react-redux and programmers don't really expect them to
// be inherited but rather explicitly connected.
@@ -265,24 +276,7 @@ export class AbstractApp extends Component {
}
}
- // By default, open the domain configured in the configuration file
- // which may be the domain at which the whole server infrastructure is
- // deployed.
- const { config } = this.props;
-
- if (typeof config === 'object') {
- const { hosts } = config;
-
- if (typeof hosts === 'object') {
- const { domain } = hosts;
-
- if (domain) {
- return `https://${domain}`;
- }
- }
- }
-
- return 'https://meet.jit.si';
+ return this.props.defaultUrl || DEFAULT_URL;
}
/**
diff --git a/react/features/app/components/App.web.js b/react/features/app/components/App.web.js
index 0488f4d23b..c4b799b717 100644
--- a/react/features/app/components/App.web.js
+++ b/react/features/app/components/App.web.js
@@ -14,7 +14,7 @@ export class App extends AbstractApp {
*
* @static
*/
- static propTypes = AbstractApp.propTypes
+ static propTypes = AbstractApp.propTypes;
/**
* Initializes a new App instance.
diff --git a/react/index.native.js b/react/index.native.js
index 0fae6971f8..fd6004b695 100644
--- a/react/index.native.js
+++ b/react/index.native.js
@@ -2,7 +2,6 @@ import 'es6-symbol/implement';
import React, { Component } from 'react';
import { AppRegistry, Linking } from 'react-native';
-import config from './config';
import { App } from './features/app';
/**
@@ -65,7 +64,6 @@ class Root extends Component {
return (
<App
- config = { config }
url = { this.state.url } />
);
}
diff --git a/react/index.web.js b/react/index.web.js
index 987e1d4fcb..cb9b594f75 100644
--- a/react/index.web.js
+++ b/react/index.web.js
@@ -5,7 +5,6 @@ import ReactDOM from 'react-dom';
import { getJitsiMeetTransport } from '../modules/transport';
-import config from './config';
import { App } from './features/app';
const logger = require('jitsi-meet-logger').getLogger(__filename);
@@ -20,9 +19,7 @@ document.addEventListener('DOMContentLoaded', () => {
logger.log('(TIME) document ready:\t', now);
// Render the main Component.
- ReactDOM.render(
- <App config = { config } />,
- document.getElementById('react'));
+ ReactDOM.render(<App />, document.getElementById('react'));
});
/**