mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Auto-stop recording when closing calls
This commit is contained in:
		@@ -501,6 +501,10 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
	async Close(propagate = true) {
 | 
						async Close(propagate = true) {
 | 
				
			||||||
		this.rootEl.remove();
 | 
							this.rootEl.remove();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Stop recording
 | 
				
			||||||
 | 
							if(this.isRecording)
 | 
				
			||||||
 | 
								this.startRecording();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Leave the call
 | 
							// Leave the call
 | 
				
			||||||
		if(UserWebSocket.IsConnected)
 | 
							if(UserWebSocket.IsConnected)
 | 
				
			||||||
			await ws("calls/leave", {
 | 
								await ws("calls/leave", {
 | 
				
			||||||
@@ -1003,6 +1007,13 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Check out whether we are currently recording video or not
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						get isRecording() {
 | 
				
			||||||
 | 
							return this.hasOwnProperty("recorder");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Start / stop recording the streams
 | 
						 * Start / stop recording the streams
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
@@ -1018,7 +1029,7 @@ class CallWindow extends CustomEvents {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Start recording
 | 
							// Start recording
 | 
				
			||||||
		if(!this.recorder) {
 | 
							if(!this.isRecording) {
 | 
				
			||||||
			// Determine the list of streams to save
 | 
								// Determine the list of streams to save
 | 
				
			||||||
			const streams = []
 | 
								const streams = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user