diff --git a/src/plugins/mpvAudioPlayer/plugin.js b/src/plugins/mpvAudioPlayer/plugin.js index ff04278b65..def917e080 100644 --- a/src/plugins/mpvAudioPlayer/plugin.js +++ b/src/plugins/mpvAudioPlayer/plugin.js @@ -68,7 +68,6 @@ class HtmlAudioPlayer { self.type = 'mediaplayer'; self.id = 'htmlaudioplayer'; self.useServerPlaybackInfoForAudio = true; - self.mustDestroy = true; self._duration = undefined; self._currentTime = undefined; diff --git a/src/plugins/mpvVideoPlayer/plugin.js b/src/plugins/mpvVideoPlayer/plugin.js index 9e8e963c13..0980cab3e2 100644 --- a/src/plugins/mpvVideoPlayer/plugin.js +++ b/src/plugins/mpvVideoPlayer/plugin.js @@ -60,7 +60,6 @@ async function getApi() { */ id = 'htmlvideoplayer'; useFullSubtitleUrls = true; - mustDestroy = true; /** * @type {boolean} */ @@ -196,6 +195,7 @@ async function getApi() { setCurrentSrc(elem, options) { return new Promise((resolve) => { const val = options.url; + this.#currentSrc = val; console.debug(`playing url: ${val}`); // Convert to seconds @@ -284,13 +284,13 @@ async function getApi() { onEndedInternal() { const stopInfo = { - src: this._currentSrc + src: this.#currentSrc }; Events.trigger(this, 'stopped', [stopInfo]); - this._currentTime = null; - this._currentSrc = null; + this.#currentTime = null; + this.#currentSrc = null; this._currentPlayOptions = null; } diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index 7e6c539442..c9ad29ddff 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -76,13 +76,7 @@ import Headroom from 'headroom.js'; } function onBackClick() { - // If playing on a player that can't be destroyed with navigation, stop it manually. - const player = playbackManager.getCurrentPlayer(); - if (player && player.mustDestroy && skinHeader.classList.contains('osdHeader')) { - playbackManager.stop(); - } else { - appRouter.back(); - } + appRouter.back(); } function retranslateUi() {