Skip to content

Commit

Permalink
Fix website always using raw audio on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwilarg committed Jan 1, 2025
1 parent 723db03 commit 3e794aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/main/getMusics.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,12 @@ function loadPage() {
});

// Read volume from local storage
const volume = localStorage.getItem("volume") ?? 0.5;
const volume = JSON.parse(localStorage.getItem("volume") ?? 0.5);
player.volume = volume;
document.getElementById("volume").value = volume * 100;

// Preferences
useRawAudio = localStorage.getItem("useRaw") ?? false;
useRawAudio = JSON.parse(localStorage.getItem("useRaw") ?? false);
const useRawToggle = document.getElementById("use-raw");
useRawToggle.checked = useRawAudio;
useRawToggle.addEventListener("change", (_) => {
Expand Down

0 comments on commit 3e794aa

Please sign in to comment.