From 6520cc2496a4ee99be45e934f79571fdda06b9b0 Mon Sep 17 00:00:00 2001 From: Payetus Date: Wed, 17 Nov 2021 17:24:18 +0100 Subject: [PATCH] feat(Lobby): Adding autoknock feature as a config (#10366) * adding lobby localization to "ca" lang * feat(Lobby): Adding autoknock config feat(Lobby): Adding autoknock config Co-authored-by: Payetus --- config.js | 3 +++ react/features/base/config/configWhitelist.js | 1 + react/features/prejoin/functions.js | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 3dcc67db5..f08679082 100644 --- a/config.js +++ b/config.js @@ -430,6 +430,9 @@ var config = { // Hides lobby button // hideLobbyButton: false, + // If Lobby is enabled starts knocking automatically. + // autoKnockLobby: false + // Require users to always specify a display name. // requireDisplayName: true, diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js index 2f3aa44d3..88712a532 100644 --- a/react/features/base/config/configWhitelist.js +++ b/react/features/base/config/configWhitelist.js @@ -18,6 +18,7 @@ export default [ 'analytics.rtcstatsEnabled', 'audioLevelsInterval', 'audioQuality', + 'autoKnockLobby', 'apiLogLevels', 'avgRtpStatsN', 'backgroundAlpha', diff --git a/react/features/prejoin/functions.js b/react/features/prejoin/functions.js index febffeafe..c165a79d5 100644 --- a/react/features/prejoin/functions.js +++ b/react/features/prejoin/functions.js @@ -180,8 +180,8 @@ export function isPrejoinPageVisible(state: Object): boolean { * @returns {boolean} */ export function shouldAutoKnock(state: Object): boolean { - const { iAmRecorder, iAmSipGateway } = state['features/base/config']; + const { iAmRecorder, iAmSipGateway, autoKnockLobby } = state['features/base/config']; - return (isPrejoinPageEnabled(state) || (iAmRecorder && iAmSipGateway)) + return (isPrejoinPageEnabled(state) || autoKnockLobby || (iAmRecorder && iAmSipGateway)) && !state['features/lobby'].knocking; }