From 790dc38ff630e314ea4d5854a0eb6f0805fa6470 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sun, 3 May 2026 15:12:07 +0200 Subject: [PATCH] fix instant unpause after previous fadeout --- copyparty/web/browser.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index c067346d..30003fca 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -2227,21 +2227,22 @@ function MPlayer() { // insta start r.fvol = r.vol; mpss.go(); + r.au.volume = r.expvol(r.fvol); } } }; r.fade_out = function () { mpss.stop(); - if(mpl.afade == false){ - // insta stop - r.au.pause(); - mpl.pp(); - return; - } r.fvol = r.vol; r.fdir = -0.05 * r.vol * (CHROME ? 2 : 1); r.ftid = r.au.tid; - fader(); + if(mpl.afade != false) + fader(); + else { + // insta stop + r.au.pause(); + mpl.pp(); + } }; r.stopfade = function (hard) { clearTimeout(r.ftimer);