|
@@ -275,8 +275,14 @@ function _constructOptions(state) {
|
275
|
275
|
// redux store.
|
276
|
276
|
const options = _.cloneDeep(state['features/base/config']);
|
277
|
277
|
|
278
|
|
- let { bosh } = options;
|
279
|
|
- const { websocket } = options;
|
|
278
|
+ let { bosh, websocket } = options;
|
|
279
|
+
|
|
280
|
+ // TESTING: Only enable WebSocket for some percentage of users.
|
|
281
|
+ if (websocket) {
|
|
282
|
+ if ((Math.random() * 100) >= (options?.testing?.mobileXmppWsThreshold ?? 0)) {
|
|
283
|
+ websocket = undefined;
|
|
284
|
+ }
|
|
285
|
+ }
|
280
|
286
|
|
281
|
287
|
// Normalize the BOSH URL.
|
282
|
288
|
if (bosh && !websocket) {
|
|
@@ -301,6 +307,8 @@ function _constructOptions(state) {
|
301
|
307
|
// WebSocket is preferred over BOSH.
|
302
|
308
|
const serviceUrl = websocket || bosh;
|
303
|
309
|
|
|
310
|
+ logger.log(`Using service URL ${serviceUrl}`);
|
|
311
|
+
|
304
|
312
|
// Append room to the URL's search.
|
305
|
313
|
const { room } = state['features/base/conference'];
|
306
|
314
|
|