From 1806baec3721765ea35b4125185455e1e8549bbd Mon Sep 17 00:00:00 2001 From: Patrick Farwick <9168045+MinecraftPlaye@users.noreply.github.com> Date: Tue, 5 Oct 2021 20:10:25 +0000 Subject: [PATCH] Move "destroy" after "stop" and separate commands --- src/plugins/comicsPlayer/plugin.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/comicsPlayer/plugin.js b/src/plugins/comicsPlayer/plugin.js index ce7fd46187..700f812f3f 100644 --- a/src/plugins/comicsPlayer/plugin.js +++ b/src/plugins/comicsPlayer/plugin.js @@ -30,17 +30,15 @@ export class ComicsPlayer { return this.setCurrentSrc(elem, options); } - destroy() { - // Nothing to do here - } - stop() { this.unbindEvents(); + const stopInfo = { src: this.item }; Events.trigger(this, 'stopped', [stopInfo]); + this.archiveSource?.release(); const elem = this.mediaElement; @@ -52,6 +50,10 @@ export class ComicsPlayer { loading.hide(); } + destroy() { + // Nothing to do here + } + currentTime() { // * 1000 is an arbitrary value copied over from the bookPlayer return this.progress * 1000;