mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Close more properly local streams.
This commit is contained in:
		@@ -488,6 +488,12 @@ ComunicWeb.components.calls.callWindow = {
 | 
			
		||||
		 */
 | 
			
		||||
		var interval = setInterval(function(){
 | 
			
		||||
 | 
			
		||||
			//Check if call is not visible anymore
 | 
			
		||||
			if(!callContainer.isConnected){
 | 
			
		||||
				call.close();
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if(!call.open)
 | 
			
		||||
				return clearInterval(interval);
 | 
			
		||||
 | 
			
		||||
@@ -811,6 +817,13 @@ ComunicWeb.components.calls.callWindow = {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//Close local stream
 | 
			
		||||
		if(call.localStream){
 | 
			
		||||
			call.localStream.getTracks().forEach(function(track){
 | 
			
		||||
				track.stop();
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//Notify server
 | 
			
		||||
		ComunicWeb.components.calls.interface.hangUp(call.info.id, function(){});
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user