aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbin Larsson <mail@albinlarsson.com>2018-06-19 16:25:37 +0200
committerAlbin Larsson <mail@albinlarsson.com>2018-06-19 16:27:06 +0200
commit43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d (patch)
tree712cdb1fd5865c0846a1e95e7adb1a6305dc2d4a /src
parent52ea5bd0ab211cc18e7d1f6de06a78d805a94b62 (diff)
downloadplyr-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.js4
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);
}
/**