miniplayer: add pause when going on music page

This commit is contained in:
Agahnim 2026-03-23 13:26:04 +01:00
parent 076922518b
commit a51f18d86e
3 changed files with 16 additions and 1 deletions

View file

@ -108,6 +108,17 @@ function initMiniPlayer() {
handlePlayPause();
}
});
audio.addEventListener("pause", () => {
isPlaying = false;
updatePlayState();
});
audio.addEventListener("play", () => {
isPlaying = true;
updatePlayState();
});
}
initMiniPlayer();