feat(config) add ability to prefer BOSH over WebSocket

There might be cases where we'd want to enforce it.
This commit is contained in:
Saúl Ibarra Corretgé
2023-10-16 15:59:32 +02:00
committed by Saúl Ibarra Corretgé
parent 4c5787511e
commit 8fc3de416c
4 changed files with 10 additions and 1 deletions

View File

@@ -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/7376

View File

@@ -520,6 +520,7 @@ export interface IConfig {
pcStatsInterval?: number;
peopleSearchQueryTypes?: string[];
peopleSearchUrl?: string;
preferBosh?: boolean;
preferredTranscribeLanguage?: string;
prejoinConfig?: {
enabled?: boolean;

View File

@@ -197,6 +197,7 @@ export default [
'participantMenuButtonsWithNotifyClick',
'participantsPane',
'pcStatsInterval',
'preferBosh',
'prejoinConfig',
'prejoinPageEnabled',
'recordingService',

View File

@@ -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;