This commit is contained in:
Araxeus
2021-05-17 00:07:28 +03:00
parent 9c7a70e056
commit e5473cdfe4

View File

@ -133,9 +133,9 @@ function changeVolume(toIncrease, options) {
const videoStream = $(".video-stream"); const videoStream = $(".video-stream");
// Apply volume change if valid // Apply volume change if valid
const steps = (options.steps || 1) / 100; const steps = (options.steps || 1) / 100;
videoStream.volume = toIncrease ? videoStream.volume = (toIncrease ?
Math.min(videoStream.volume + steps, 1) : Math.min(videoStream.volume + steps, 1) :
Math.max(videoStream.volume - steps, 0).toFixed(2); Math.max(videoStream.volume - steps, 0)).toFixed(2);
// Save the new volume // Save the new volume
saveVolume(toPercent(videoStream.volume), options); saveVolume(toPercent(videoStream.volume), options);