diff --git a/web/assets/js/main.js b/web/assets/js/main.js index 60026c5..fd38619 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -84,11 +84,11 @@ audio.hidden = true; const audio_src = audio.childNodes[0].src; const volume = $("radio-volume"); -volume.value = +(localStorage.getItem("volume") || 50) * 100.0; +volume.value = +(localStorage.getItem("volume") || 50); audio.volume = volume.value / 100.0; volume.addEventListener("input", e => { audio.volume = e.target.value / 100.0; - localStorage.setItem("volume", audio.volume); }); + localStorage.setItem("volume", e.target.value); }); $("player").style.display = $("player").firstChild.style.display = "flex";