1
0

In main.js fixed a bug and removed a multiplication by 100 for volume control.

This commit is contained in:
Alexander Andreev 2024-05-10 02:23:09 +04:00
parent fb5c46381e
commit 0a55b115fb
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -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";