diff options
author | Albin Larsson <mail@albinlarsson.com> | 2018-06-19 16:25:37 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2018-06-19 16:27:06 +0200 |
commit | 43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d (patch) | |
tree | 712cdb1fd5865c0846a1e95e7adb1a6305dc2d4a /src | |
parent | 52ea5bd0ab211cc18e7d1f6de06a78d805a94b62 (diff) | |
download | plyr-43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d.tar.lz plyr-43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d.tar.xz plyr-43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d.zip |
Make (increase/decrease)Volume methods ignore invalid input instead of raising / lowering to the min / max
Diffstat (limited to 'src')
-rw-r--r-- | src/js/plyr.js | 4 |
1 files changed, 2 insertions, 2 deletions
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); } /** |