diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index 7d7336c..52ced0c 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -1030,20 +1030,20 @@ export default class RoomClient this._hark = hark(this._harkStream, { play : false, - interval : 5, + interval : 10, threshold : store.getState().settings.noiseThreshold, - history : 300 + history : 100 }); this._hark.lastVolume = -100; this._hark.on('volume_change', (volume) => { volume = Math.round(volume); - if (this._micProducer && volume !== Math.round(this._hark.lastVolume)) + if (this._micProducer && (volume !== Math.round(this._hark.lastVolume))) { - if (volume < this._hark.lastVolume * 1.02) + if (volume < this._hark.lastVolume) { - volume = this._hark.lastVolume * 1.02; + volume = this._hark.lastVolume - Math.pow((volume - this._hark.lastVolume)/(100 + this._hark.lastVolume),4)*2; } this._hark.lastVolume = volume; store.dispatch(peerVolumeActions.setPeerVolume(this._peerId, volume)); diff --git a/app/src/components/Containers/Volume.js b/app/src/components/Containers/Volume.js index 81a050b..4ac09bb 100644 --- a/app/src/components/Containers/Volume.js +++ b/app/src/components/Containers/Volume.js @@ -58,27 +58,27 @@ const styles = () => '&.level6' : { height : '60%', - backgroundColor : 'rgba(255, 0, 0, 0.65)' + backgroundColor : 'rgba(255, 165, 0, 0.65)' }, '&.level7' : { height : '70%', - backgroundColor : 'rgba(255, 0, 0, 0.65)' + backgroundColor : 'rgba(255, 100, 0, 0.65)' }, '&.level8' : { height : '80%', - backgroundColor : 'rgba(0, 0, 0, 0.65)' + backgroundColor : 'rgba(255, 60, 0, 0.65)' }, '&.level9' : { height : '90%', - backgroundColor : 'rgba(0, 0, 0, 0.65)' + backgroundColor : 'rgba(255, 30, 0, 0.65)' }, '&.level10' : { height : '100%', - backgroundColor : 'rgba(0, 0, 0, 0.65)' + backgroundColor : 'rgba(255, 0, 0, 0.65)' } }, volumeSmall :