Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat((rn,config) add a/b test flag to enable XMPP WebSockets on mobile
Saúl Ibarra Corretgéa8f281a43e21
diff --git a/config.js b/config.jsindex 626fef7440..12cdde90d2 100644--- a/config.js+++ b/config.js@@ -45,9 +45,12 @@ var config = {// disabled by the below option.// enableThumbnailReordering: true,+ // Enables XMPP WebSocket (as opposed to BOSH) for the given amount of users.+ // mobileXmppWsThreshold: 10 // enable XMPP WebSockets on mobile for 10% of the users+// P2P test mode disables automatic switching to P2P when there are 2// participants in the conference.- p2pTestMode: false+ // p2pTestMode: false,// Enables the test specific features consumed by jitsi-meet-torture// testMode: falsediff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.jsindex 0f6c50ac28..532bb74b28 100644--- a/react/features/base/connection/actions.native.js+++ b/react/features/base/connection/actions.native.js@@ -275,8 +275,14 @@ function _constructOptions(state) {// redux store.const options = _.cloneDeep(state['features/base/config']);- let { bosh } = options;- const { websocket } = options;+ let { bosh, websocket } = options;++ // TESTING: Only enable WebSocket for some percentage of users.+ if (websocket) {+ if ((Math.random() * 100) >= (options?.testing?.mobileXmppWsThreshold ?? 0)) {+ websocket = undefined;+ }+ }// Normalize the BOSH URL.if (bosh && !websocket) {@@ -301,6 +307,8 @@ function _constructOptions(state) {// WebSocket is preferred over BOSH.const serviceUrl = websocket || bosh;+ logger.log(`Using service URL ${serviceUrl}`);+// Append room to the URL's search.const { room } = state['features/base/conference'];