show mute icon when volume=0

This commit is contained in:
Araxeus
2021-05-16 22:39:11 +03:00
parent 65178b259f
commit 58557505ae

View File

@ -136,7 +136,9 @@ function changeVolume(toIncrease, options) {
// Save the new volume
saveVolume(toPercent(videoStream.volume), options);
// Slider value automatically rounds to multiples of 5
slider.value = Math.max(options.savedVolume, 5);
slider.value = options.savedVolume > 0 && options.savedVolume < 5 ?
5 : options.savedVolume;
// Change tooltips to new value
setTooltip(options.savedVolume);
// Show volume slider