Merge branch 'feat-audio-settings' into develop
This commit is contained in:
@@ -18,7 +18,8 @@ const initialState =
|
||||
raisedHand : false,
|
||||
raisedHandInProgress : false,
|
||||
loggedIn : false,
|
||||
isSpeaking : false
|
||||
isSpeaking : false,
|
||||
isAutoMuted : true
|
||||
};
|
||||
|
||||
const me = (state = initialState, action) =>
|
||||
@@ -162,6 +163,13 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, isSpeaking: flag };
|
||||
}
|
||||
|
||||
case 'SET_AUTO_MUTED':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, isAutoMuted: flag };
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -31,9 +31,10 @@ const peerVolumes = (state = initialState, action) =>
|
||||
|
||||
case 'SET_PEER_VOLUME':
|
||||
{
|
||||
const { peerId, volume } = action.payload;
|
||||
const { peerId } = action.payload;
|
||||
const dBs = action.payload.volume < -100 ? -100 : action.payload.volume;
|
||||
|
||||
return { ...state, [peerId]: volume };
|
||||
return { ...state, [peerId]: Math.round(dBs) };
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
const initialState =
|
||||
{
|
||||
displayName : 'Guest',
|
||||
selectedWebcam : null,
|
||||
selectedAudioDevice : null,
|
||||
advancedMode : false,
|
||||
sampleRate : 48000,
|
||||
channelCount : 1,
|
||||
volume : 1.0,
|
||||
autoGainControl : true,
|
||||
echoCancellation : true,
|
||||
noiseSuppression : true,
|
||||
sampleSize : 16,
|
||||
displayName : 'Guest',
|
||||
selectedWebcam : null,
|
||||
selectedAudioDevice : null,
|
||||
advancedMode : false,
|
||||
sampleRate : 48000,
|
||||
channelCount : 1,
|
||||
volume : 1.0,
|
||||
autoGainControl : false,
|
||||
echoCancellation : true,
|
||||
noiseSuppression : true,
|
||||
voiceActivatedUnmute : false,
|
||||
noiseThreshold : -50,
|
||||
sampleSize : 16,
|
||||
// low, medium, high, veryhigh, ultra
|
||||
resolution : window.config.defaultResolution || 'medium',
|
||||
lastN : 4,
|
||||
permanentTopBar : true,
|
||||
hiddenControls : false,
|
||||
showNotifications : true,
|
||||
notificationSounds : true,
|
||||
buttonControlBar : window.config.buttonControlBar || false,
|
||||
drawerOverlayed : window.config.drawerOverlayed || true,
|
||||
autoMuteThreshold : window.config.autoMuteThreshold || 4,
|
||||
resolution : window.config.defaultResolution || 'medium',
|
||||
lastN : 4,
|
||||
permanentTopBar : true,
|
||||
hiddenControls : false,
|
||||
showNotifications : true,
|
||||
notificationSounds : true,
|
||||
buttonControlBar : window.config.buttonControlBar || false,
|
||||
drawerOverlayed : window.config.drawerOverlayed || true,
|
||||
autoMuteThreshold : window.config.autoMuteThreshold || 4,
|
||||
...window.config.defaultAudio
|
||||
};
|
||||
|
||||
@@ -99,6 +101,20 @@ const settings = (state = initialState, action) =>
|
||||
return { ...state, noiseSuppression };
|
||||
}
|
||||
|
||||
case 'SET_VOICE_ACTIVATED_UNMUTE':
|
||||
{
|
||||
const { voiceActivatedUnmute } = action.payload;
|
||||
|
||||
return { ...state, voiceActivatedUnmute };
|
||||
}
|
||||
|
||||
case 'SET_NOISE_THRESHOLD':
|
||||
{
|
||||
const { noiseThreshold } = action.payload;
|
||||
|
||||
return { ...state, noiseThreshold };
|
||||
}
|
||||
|
||||
case 'SET_DEFAULT_AUDIO':
|
||||
{
|
||||
const { audio } = action.payload;
|
||||
|
||||
Reference in New Issue
Block a user