In main.js fixed a bug and removed a multiplication by 100 for volume control.
This commit is contained in:
parent
fb5c46381e
commit
0a55b115fb
@ -84,11 +84,11 @@ audio.hidden = true;
|
|||||||
const audio_src = audio.childNodes[0].src;
|
const audio_src = audio.childNodes[0].src;
|
||||||
|
|
||||||
const volume = $("radio-volume");
|
const volume = $("radio-volume");
|
||||||
volume.value = +(localStorage.getItem("volume") || 50) * 100.0;
|
volume.value = +(localStorage.getItem("volume") || 50);
|
||||||
audio.volume = volume.value / 100.0;
|
audio.volume = volume.value / 100.0;
|
||||||
volume.addEventListener("input", e => {
|
volume.addEventListener("input", e => {
|
||||||
audio.volume = e.target.value / 100.0;
|
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";
|
$("player").style.display = $("player").firstChild.style.display = "flex";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user