Fixed not being able to unsubscribe events (#556)
This commit is contained in:
		
							parent
							
								
									3b639732f7
								
							
						
					
					
						commit
						747682c944
					
				@ -148,9 +148,9 @@ export class FFmpeg {
 | 
				
			|||||||
    callback: LogEventCallback | ProgressEventCallback
 | 
					    callback: LogEventCallback | ProgressEventCallback
 | 
				
			||||||
  ) {
 | 
					  ) {
 | 
				
			||||||
    if (event === "log") {
 | 
					    if (event === "log") {
 | 
				
			||||||
      this.#logEventCallbacks.filter((f) => f !== callback);
 | 
					      this.#logEventCallbacks = this.#logEventCallbacks.filter((f) => f !== callback);
 | 
				
			||||||
    } else if (event === "progress") {
 | 
					    } else if (event === "progress") {
 | 
				
			||||||
      this.#progressEventCallbacks.filter((f) => f !== callback);
 | 
					      this.#progressEventCallbacks = this.#progressEventCallbacks.filter((f) => f !== callback);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user