more conservative settings for hark; adjust volume indicators colors to dB scale, improved decay for audio indicators

auto_join_3.3
Stefan Otto 2020-05-20 11:19:20 +02:00
parent 185b3d40bd
commit ad3f7df203
2 changed files with 10 additions and 10 deletions

View File

@ -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));

View File

@ -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 :