Default volume to 100%
This commit is contained in:
parent
dcc31cc85a
commit
eed682c719
8 changed files with 16 additions and 8 deletions
|
|
@ -197,7 +197,11 @@ audioSelect.addEventListener('change', () => {
|
|||
// Set initial playback state and volume based on saved preferences
|
||||
if (savedTime) audio.currentTime = parseFloat(savedTime);
|
||||
|
||||
if (savedVolume) document.getElementById("volume").value = savedVolume * 100;
|
||||
if (savedVolume) {
|
||||
document.getElementById("volume").value = savedVolume * 100;
|
||||
} else {
|
||||
document.getElementById("volume").value = 100;
|
||||
}
|
||||
|
||||
if (wasPlaying) {
|
||||
play();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue