Add autoMuteThreshold
parent
41d62cf9b8
commit
8d9a045f32
|
|
@ -52,6 +52,16 @@ var config =
|
||||||
noiseSuppression : true,
|
noiseSuppression : true,
|
||||||
sampleSize : 16
|
sampleSize : 16
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the auto mute / Push To Talk threshold
|
||||||
|
* default value is 4
|
||||||
|
*
|
||||||
|
* Set it to 0 to disable auto mute functionality,
|
||||||
|
* but use it with caution
|
||||||
|
* full mesh audio strongly decrease room capacity!
|
||||||
|
*/
|
||||||
|
autoMuteThreshold : 4,
|
||||||
background : 'images/background.jpg',
|
background : 'images/background.jpg',
|
||||||
defaultLayout : 'democratic', // democratic, filmstrip
|
defaultLayout : 'democratic', // democratic, filmstrip
|
||||||
// If true, will show media control buttons in separate
|
// If true, will show media control buttons in separate
|
||||||
|
|
|
||||||
|
|
@ -2960,7 +2960,9 @@ export default class RoomClient
|
||||||
if (!this._muted)
|
if (!this._muted)
|
||||||
{
|
{
|
||||||
await this.enableMic();
|
await this.enableMic();
|
||||||
if (peers.length > 4)
|
const { autoMuteThreshold } = store.getState().settings;
|
||||||
|
|
||||||
|
if (autoMuteThreshold && peers.length > autoMuteThreshold)
|
||||||
this.muteMic();
|
this.muteMic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ const initialState =
|
||||||
notificationSounds : true,
|
notificationSounds : true,
|
||||||
buttonControlBar : window.config.buttonControlBar || false,
|
buttonControlBar : window.config.buttonControlBar || false,
|
||||||
drawerOverlayed : window.config.drawerOverlayed || true,
|
drawerOverlayed : window.config.drawerOverlayed || true,
|
||||||
|
autoMuteThreshold : window.config.autoMuteThreshold || 4,
|
||||||
...window.config.defaultAudio
|
...window.config.defaultAudio
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue