aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2017-11-24 08:47:11 +1100
committerSam Potts <me@sampotts.me>2017-11-24 08:47:11 +1100
commitfda19771197e5e57a496f8d8136cf32729e34756 (patch)
tree037d91aaff44c20f20f1f9484892babea33334bd /src
parentf7bf0961cfbd75d285010f18645d1bd35f0ca43b (diff)
downloadplyr-fda19771197e5e57a496f8d8136cf32729e34756.tar.lz
plyr-fda19771197e5e57a496f8d8136cf32729e34756.tar.xz
plyr-fda19771197e5e57a496f8d8136cf32729e34756.zip
Fix for keyboard increase/decrease volume
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 54734fde..86ad0ba0 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -474,7 +474,7 @@ class Plyr {
*/
increaseVolume(step) {
const volume = this.media.muted ? 0 : this.volume;
- this.volume = volume + utils.is.number(step) ? step : 1;
+ this.volume = volume + (utils.is.number(step) ? step : 1);
return this;
}
@@ -484,7 +484,7 @@ class Plyr {
*/
decreaseVolume(step) {
const volume = this.media.muted ? 0 : this.volume;
- this.volume = volume - utils.is.number(step) ? step : 1;
+ this.volume = volume - (utils.is.number(step) ? step : 1);
return this;
}