Fix: match jellyfin-web audio fade out

This commit is contained in:
Andrew Rabert committed 2025-11-29 16:26:54 -05:00
1 parent 0ffe0cf76e
commit b3a43cbdf4
1 file changed
+7 -4
+7 -4
View File
@@ -108,6 +108,12 @@ class mpvAudioPlayer {
const src = self._currentSrc;
if (src) {
if (!destroyPlayer) {
self.pause();
self.onEndedInternal();
return Promise.resolve();
}
const originalVolume = self._volume;
return fade(self, null, self._volume).then(function () {
@@ -115,10 +121,7 @@ class mpvAudioPlayer {
self.setVolume(originalVolume, false);
self.onEndedInternal();
if (destroyPlayer) {
self.destroy();
}
self.destroy();
});
}
return Promise.resolve();