mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 04:09:20 +00:00
Limit the number of time we check if the user is talking or not
This commit is contained in:
parent
576a7779ed
commit
a653eab59d
@ -820,8 +820,17 @@ class CallWindow extends CustomEvents {
|
||||
|
||||
const memberEl = this.getMemberNameEl(peerID);
|
||||
|
||||
let callsCount = 0;
|
||||
|
||||
script_processor_analysis_node.onaudioprocess = (e) => {
|
||||
|
||||
// Do not update count each time
|
||||
callsCount++;
|
||||
if(callsCount < 5)
|
||||
return;
|
||||
callsCount = 0;
|
||||
|
||||
|
||||
script_processor_analysis_node.onaudioprocess = function(e) {
|
||||
analyzer_node.getByteFrequencyData(freq_data);
|
||||
|
||||
let count = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user