From 43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Tue, 19 Jun 2018 16:25:37 +0200 Subject: Make (increase/decrease)Volume methods ignore invalid input instead of raising / lowering to the min / max --- src/js/plyr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/js/plyr.js b/src/js/plyr.js index c2bb6a4d..9e00e836 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -553,7 +553,7 @@ class Plyr { */ increaseVolume(step) { const volume = this.media.muted ? 0 : this.volume; - this.volume = volume + (is.number(step) ? step : 1); + this.volume = volume + (is.number(step) ? step : 0); } /** @@ -562,7 +562,7 @@ class Plyr { */ decreaseVolume(step) { const volume = this.media.muted ? 0 : this.volume; - this.volume = volume - (is.number(step) ? step : 1); + this.volume = volume - (is.number(step) ? step : 0); } /** -- cgit v1.2.3