From 9863ca79112d91bff7b47132480d58b1ea2cb7ed Mon Sep 17 00:00:00 2001 From: Armin Date: Wed, 8 Jul 2026 17:17:29 +0200 Subject: [PATCH] fix: pause button toggles between pause and resume --- index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 4fb95c0..18d8a13 100644 --- a/index.html +++ b/index.html @@ -1502,8 +1502,12 @@ playBtn.addEventListener('click', () => { }); pauseBtn.addEventListener('click', () => { if (currentIndex < 0) return; - audio.pause(); - if (isCrossfading) audioNext.pause(); + if (audio.paused) { + audio.play().catch(() => {}); + } else { + audio.pause(); + if (isCrossfading) audioNext.pause(); + } }); stopBtn.addEventListener('click', () => { if (currentIndex < 0) return;