mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Limit the number of time we check if the user is talking or not
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user