Skip to content

Commit

Permalink
fix: stop music
Browse files Browse the repository at this point in the history
  • Loading branch information
7underlines committed Jul 29, 2024
1 parent 4179908 commit 0cca593
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions www/assets/js/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,10 @@ document.querySelector("#title-screen").addEventListener("click", function () {
setVolume();
sfxOpen.play();
});

document.addEventListener("visibilitychange", function () {
bgmDungeon.stop();
bgmBattleMain.stop();
bgmBattleGuardian.stop();
bgmBattleBoss.stop();
});

0 comments on commit 0cca593

Please sign in to comment.