Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix removeListener if player embed api

Chocobozzzc360e6cc1a40
diff --git a/client/src/standalone/player/events.ts b/client/src/standalone/player/events.ts
index 7a8e9dbec0..77d21c78c4 100644
--- a/client/src/standalone/player/events.ts
+++ b/client/src/standalone/player/events.ts
@@ -41,7 +41,7 @@ export class EventRegistrar {
public removeListener<T> (name: string, handler: EventHandler<T>) {
if (!this.eventRegistrations[name]) return false
- this.eventRegistrations[name].registrations = this.eventRegistrations[name].registrations.filter(x => x === handler)
+ this.eventRegistrations[name].registrations = this.eventRegistrations[name].registrations.filter(x => x !== handler)
return true
}