|
@@ -155,6 +155,29 @@ const WHITELISTED_KEYS = [
|
155
|
155
|
export { default as getRoomName } from './getRoomName';
|
156
|
156
|
export { parseURLParams };
|
157
|
157
|
|
|
158
|
+/**
|
|
159
|
+ * Create a "fake" configuration object for the given base URL. This is used in case the config
|
|
160
|
+ * couldn't be loaded in the welcome page, so at least we have something to try with.
|
|
161
|
+ *
|
|
162
|
+ * @param {string} baseURL - URL of the deployment for which we want the fake config.
|
|
163
|
+ * @returns {Object}
|
|
164
|
+ */
|
|
165
|
+export function createFakeConfig(baseURL: string) {
|
|
166
|
+ const url = new URL(baseURL);
|
|
167
|
+
|
|
168
|
+ return {
|
|
169
|
+ hosts: {
|
|
170
|
+ domain: url.hostname,
|
|
171
|
+ muc: `conference.${url.hostname}`
|
|
172
|
+ },
|
|
173
|
+ bosh: `${baseURL}http-bind`,
|
|
174
|
+ clientNode: 'https://jitsi.org/jitsi-meet',
|
|
175
|
+ p2p: {
|
|
176
|
+ enabled: true
|
|
177
|
+ }
|
|
178
|
+ };
|
|
179
|
+}
|
|
180
|
+
|
158
|
181
|
/**
|
159
|
182
|
* Promise wrapper on obtain config method. When HttpConfigFetch will be moved
|
160
|
183
|
* to React app it's better to use load config instead.
|