diff --git a/config.js b/config.js index 52c61cca1..6bb637585 100644 --- a/config.js +++ b/config.js @@ -125,6 +125,9 @@ var config = { // Enables support for opus-red (redundancy for Opus). // enableOpusRed: false, + // Enables HD audio quality (but also disables echo cancellation, noise suppression and AGC). + // enableHdAudio: false, + // Video // Sets the preferred resolution (height) for local video. Defaults to 720. diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js index 98a3a1bae..17974b62a 100644 --- a/react/features/base/config/configWhitelist.js +++ b/react/features/base/config/configWhitelist.js @@ -104,6 +104,7 @@ export default [ 'e2eping', 'enableDisplayNameInStats', 'enableEmailInStats', + 'enableHdAudio', 'enableIceRestart', 'enableInsecureRoomNameWarning', 'enableLayerSuspension', diff --git a/react/features/base/lib-jitsi-meet/actions.js b/react/features/base/lib-jitsi-meet/actions.js index 6114455f8..b92959491 100644 --- a/react/features/base/lib-jitsi-meet/actions.js +++ b/react/features/base/lib-jitsi-meet/actions.js @@ -42,11 +42,25 @@ export function initLib() { return (dispatch: Dispatch, getState: Function): void => { const state = getState(); const config = state['features/base/config']; + const { enableHdAudio } = config; if (!config) { throw new Error('Cannot init lib-jitsi-meet without config'); } + if (enableHdAudio) { + Object.assign(config, { + ...config, + channelCount: 2, + disableAP: true, + enableNoAudioDetection: false, + enableNoisyMicDetection: false, + enableTalkWhileMuted: false, + opusMaxAverageBitrate: 510000, + stereo: true + }); + } + dispatch({ type: LIB_WILL_INIT }); try {