Fixed not being able to unsubscribe events (#556)

This commit is contained in:
Matthias 2023-08-20 03:23:30 +02:00 committed by GitHub
parent 3b639732f7
commit 747682c944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
} }
} }