From 9f6fdfdd7215c724385f8b0ac813787e8e84025a Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Thu, 23 Sep 2021 21:30:59 +0300 Subject: [PATCH] Destroy the player after destroying JavascriptSubtitlesOctopus --- src/plugins/htmlVideoPlayer/plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index cf477bfd9d..f1a0f427d6 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -675,14 +675,14 @@ function tryRemoveElement(elem) { } onEndedInternal(this, elem, this.onError); - - if (destroyPlayer) { - this.destroy(); - } } this.destroyCustomTrack(elem); + if (destroyPlayer) { + this.destroy(); + } + return Promise.resolve(); }