Fix for keyboard increase/decrease volume

This commit is contained in:
Sam Potts 2017-11-24 08:47:11 +11:00
parent f7bf0961cf
commit fda1977119
3 changed files with 4 additions and 4 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -474,7 +474,7 @@ class Plyr {
*/ */
increaseVolume(step) { increaseVolume(step) {
const volume = this.media.muted ? 0 : this.volume; 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; return this;
} }
@ -484,7 +484,7 @@ class Plyr {
*/ */
decreaseVolume(step) { decreaseVolume(step) {
const volume = this.media.muted ? 0 : this.volume; 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; return this;
} }