Implement review changes 2
This commit is contained in:
parent
e0da67dff5
commit
b53ad353cb
|
@ -125,8 +125,12 @@ 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,
|
||||
// Specify audio quality stereo and opusMaxAverageBitrate values, both necessary in order to enable HD audio.
|
||||
// Beware, by doing so, you are disabling echo cancellation, noise suppression and AGC.
|
||||
// audioQuality: {
|
||||
// stereo: false,
|
||||
// opusMaxAverageBitrate: null // Value to fit the 6000 to 510000 range.
|
||||
// }
|
||||
|
||||
// Video
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ export default [
|
|||
'abTesting',
|
||||
'analytics.disabled',
|
||||
'audioLevelsInterval',
|
||||
'audioQuality',
|
||||
'apiLogLevels',
|
||||
'avgRtpStatsN',
|
||||
'backgroundAlpha',
|
||||
|
@ -104,7 +105,6 @@ export default [
|
|||
'e2eping',
|
||||
'enableDisplayNameInStats',
|
||||
'enableEmailInStats',
|
||||
'enableHdAudio',
|
||||
'enableIceRestart',
|
||||
'enableInsecureRoomNameWarning',
|
||||
'enableLayerSuspension',
|
||||
|
|
|
@ -56,18 +56,6 @@ const INITIAL_RN_STATE = {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Options that enable stereo and HD audio if the {@code enableHdAudio} config option is set.
|
||||
*/
|
||||
const hdAudioOptions = {
|
||||
disableAP: true,
|
||||
enableNoAudioDetection: false,
|
||||
enableNoisyMicDetection: false,
|
||||
enableTalkWhileMuted: false,
|
||||
opusMaxAverageBitrate: 510000,
|
||||
stereo: true
|
||||
};
|
||||
|
||||
ReducerRegistry.register('features/base/config', (state = _getInitialState(), action) => {
|
||||
switch (action.type) {
|
||||
case UPDATE_CONFIG:
|
||||
|
@ -154,11 +142,26 @@ function _setConfig(state, { config }) {
|
|||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
config = _translateLegacyConfig(config);
|
||||
const hdAudioOptions = {};
|
||||
const { audioQuality } = config;
|
||||
|
||||
if (audioQuality?.stereo && audioQuality?.opusMaxAverageBitrate) {
|
||||
const { opusMaxAverageBitrate, stereo } = audioQuality;
|
||||
|
||||
Object.assign(hdAudioOptions, {
|
||||
disableAP: true,
|
||||
enableNoAudioDetection: false,
|
||||
enableNoisyMicDetection: false,
|
||||
enableTalkWhileMuted: false,
|
||||
opusMaxAverageBitrate,
|
||||
stereo
|
||||
});
|
||||
}
|
||||
|
||||
const newState = _.merge(
|
||||
{},
|
||||
config,
|
||||
config.enableHdAudio ? hdAudioOptions : {},
|
||||
hdAudioOptions,
|
||||
{ error: undefined },
|
||||
|
||||
// The config of _getInitialState() is meant to override the config
|
||||
|
|
Loading…
Reference in New Issue