fix: dont set current audio vol if not playing
This commit is contained in:
@@ -119,7 +119,7 @@ playBtn.onclick = () => {
|
|||||||
volumeSlider.oninput = () => {
|
volumeSlider.oninput = () => {
|
||||||
maxVolume = volumeSlider.value;
|
maxVolume = volumeSlider.value;
|
||||||
currentVolumeLabel.textContent = `${maxVolume}%`;
|
currentVolumeLabel.textContent = `${maxVolume}%`;
|
||||||
if (!isFading) {
|
if (!isFading && currentAudio) {
|
||||||
currentAudio.volume = maxVolume / 100;
|
currentAudio.volume = maxVolume / 100;
|
||||||
currentVolume = maxVolume;
|
currentVolume = maxVolume;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user