diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index df0615f..30986d0 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -151,6 +151,8 @@ class Player extends ((PlayerEmitter as unknown) as { new (): EventEmitter }) { } cleanup() { + // Unsubscribe from events. + this.wavesurfer.unAll(); // Let wavesurfer remove the old media, otherwise ram leak! this.wavesurfer.destroy(); }