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(config) add ability to prefer BOSH over WebSocket
Saúl Ibarra Corretgé8fc3de416ceb
diff --git a/config.js b/config.jsindex 92877b9558..fcd0b6405d 100644--- a/config.js+++ b/config.js@@ -51,6 +51,9 @@ var config = {// Websocket URL (XMPP)// websocket: 'wss://jitsi-meet.example.com/' + subdir + 'xmpp-websocket',+ // Whether BOSH should be preferred over WebSocket if both are configured.+ // preferBosh: false,+// The real JID of focus participant - can be overridden here// Do not change username - FIXME: Make focus username configurable// https://github.com/jitsi/jitsi-meet/issues/7376diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.tsindex 5050fd2ff7..f0b61b9c88 100644--- a/react/features/base/config/configType.ts+++ b/react/features/base/config/configType.ts@@ -520,6 +520,7 @@ export interface IConfig {pcStatsInterval?: number;peopleSearchQueryTypes?: string[];peopleSearchUrl?: string;+ preferBosh?: boolean;preferredTranscribeLanguage?: string;prejoinConfig?: {enabled?: boolean;diff --git a/react/features/base/config/configWhitelist.ts b/react/features/base/config/configWhitelist.tsindex 1572f70478..be482ea0b1 100644--- a/react/features/base/config/configWhitelist.ts+++ b/react/features/base/config/configWhitelist.ts@@ -197,6 +197,7 @@ export default ['participantMenuButtonsWithNotifyClick','participantsPane','pcStatsInterval',+ 'preferBosh','prejoinConfig','prejoinPageEnabled','recordingService',diff --git a/react/features/base/connection/actions.any.ts b/react/features/base/connection/actions.any.tsindex 49bbc9c9c8..0e0fb41270 100644--- a/react/features/base/connection/actions.any.ts+++ b/react/features/base/connection/actions.any.ts@@ -120,7 +120,7 @@ export function constructOptions(state: IReduxState) {options.iceServersOverride = iceServersOverride;}- const { bosh } = options;+ const { bosh, preferBosh } = options;let { websocket } = options;// TESTING: Only enable WebSocket for some percentage of users.@@ -130,6 +130,10 @@ export function constructOptions(state: IReduxState) {}}+ if (preferBosh) {+ websocket = undefined;+ }+// WebSocket is preferred over BOSH.const serviceUrl = websocket || bosh;