From eb5acba97e418114a29a2b388840f6f97d74b939 Mon Sep 17 00:00:00 2001 From: Martin <901824+martinstark@users.noreply.github.com> Date: Wed, 29 Mar 2023 13:59:40 +0200 Subject: [PATCH 1/2] fix: prevent memory leak by de-registering event handlers (cherry picked from commit 00d443a95487734e5bdcb2d8794d1212fd4bf4df) --- src/ts/InternalBitmovinYospacePlayer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts/InternalBitmovinYospacePlayer.ts b/src/ts/InternalBitmovinYospacePlayer.ts index 33300aa..2905a18 100644 --- a/src/ts/InternalBitmovinYospacePlayer.ts +++ b/src/ts/InternalBitmovinYospacePlayer.ts @@ -1193,8 +1193,8 @@ export class InternalBitmovinYospacePlayer implements BitmovinYospacePlayerAPI { this.player.off(this.player.exports.PlayerEvent.StallStarted, this.onStallStarted); this.player.off(this.player.exports.PlayerEvent.StallEnded, this.onStallEnded); - this.player.on(this.player.exports.PlayerEvent.Muted, this.onMuted); - this.player.on(this.player.exports.PlayerEvent.Unmuted, this.onUnmuted); + this.player.off(this.player.exports.PlayerEvent.Muted, this.onMuted); + this.player.off(this.player.exports.PlayerEvent.Unmuted, this.onUnmuted); // To support ads in live streams we need to track metadata events this.player.off(this.player.exports.PlayerEvent.Metadata, this.onMetaData); From 1789e98a5f8e18d159a374e3c44b748f7e163dd8 Mon Sep 17 00:00:00 2001 From: Daniel Weinberger Date: Fri, 12 Jul 2024 09:01:02 +0200 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8cf663..2c83be2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Parsing non-Yospace ID3 tags and passing those to the Yospace SDK +- Small memory leak where player listeners were not detached ## [2.5.0] - 2024-07-10