|
@@ -20,6 +20,11 @@ import {
|
20
|
20
|
|
21
|
21
|
declare var APP: Object;
|
22
|
22
|
|
|
23
|
+/**
|
|
24
|
+ * Default URL to be loaded if no other was specified using props.
|
|
25
|
+ */
|
|
26
|
+const DEFAULT_URL = 'https://meet.jit.si';
|
|
27
|
+
|
23
|
28
|
/**
|
24
|
29
|
* Base (abstract) class for main App component.
|
25
|
30
|
*
|
|
@@ -32,7 +37,14 @@ export class AbstractApp extends Component {
|
32
|
37
|
* @static
|
33
|
38
|
*/
|
34
|
39
|
static propTypes = {
|
35
|
|
- config: React.PropTypes.object,
|
|
40
|
+ /**
|
|
41
|
+ * Default URL to be loaded by the app when not in any room.
|
|
42
|
+ */
|
|
43
|
+ defaultUrl: React.PropTypes.string,
|
|
44
|
+
|
|
45
|
+ /**
|
|
46
|
+ * (Optional) Redux store for this app.
|
|
47
|
+ */
|
36
|
48
|
store: React.PropTypes.object,
|
37
|
49
|
|
38
|
50
|
/**
|
|
@@ -193,10 +205,9 @@ export class AbstractApp extends Component {
|
193
|
205
|
_createElement(component, props) {
|
194
|
206
|
/* eslint-disable no-unused-vars, lines-around-comment */
|
195
|
207
|
const {
|
196
|
|
- // Don't propagate the config prop(erty) because the config is
|
197
|
|
- // stored inside the Redux state and, thus, is visible to the
|
198
|
|
- // children anyway.
|
199
|
|
- config,
|
|
208
|
+ // The defaultUrl property was introduced to be consumed entirely by
|
|
209
|
+ // AbstractApp.
|
|
210
|
+ defaultUrl,
|
200
|
211
|
// Don't propagate the dispatch and store props because they usually
|
201
|
212
|
// come from react-redux and programmers don't really expect them to
|
202
|
213
|
// be inherited but rather explicitly connected.
|
|
@@ -265,24 +276,7 @@ export class AbstractApp extends Component {
|
265
|
276
|
}
|
266
|
277
|
}
|
267
|
278
|
|
268
|
|
- // By default, open the domain configured in the configuration file
|
269
|
|
- // which may be the domain at which the whole server infrastructure is
|
270
|
|
- // deployed.
|
271
|
|
- const { config } = this.props;
|
272
|
|
-
|
273
|
|
- if (typeof config === 'object') {
|
274
|
|
- const { hosts } = config;
|
275
|
|
-
|
276
|
|
- if (typeof hosts === 'object') {
|
277
|
|
- const { domain } = hosts;
|
278
|
|
-
|
279
|
|
- if (domain) {
|
280
|
|
- return `https://${domain}`;
|
281
|
|
- }
|
282
|
|
- }
|
283
|
|
- }
|
284
|
|
-
|
285
|
|
- return 'https://meet.jit.si';
|
|
279
|
+ return this.props.defaultUrl || DEFAULT_URL;
|
286
|
280
|
}
|
287
|
281
|
|
288
|
282
|
/**
|