mic indicator for autoMute with noiseThreshold

This commit is contained in:
Stefan Otto
2020-05-18 23:38:17 +02:00
parent 75912c71c2
commit 6331bb18b4
5 changed files with 70 additions and 13 deletions
+9 -1
View File
@@ -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;
}
+1 -1
View File
@@ -32,7 +32,7 @@ const peerVolumes = (state = initialState, action) =>
case 'SET_PEER_VOLUME':
{
const { peerId } = action.payload;
const dBs = action.payload.volume;
const dBs = action.payload.volume < -100 ? -100 : action.payload.volume;
return { ...state, [peerId]: Math.round(dBs) };
}