aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-06-25 23:09:13 +1000
committerSam Potts <sam@potts.es>2018-06-25 23:09:13 +1000
commite59fe1aacfcb1366cedcb1a65c4ad22f588f8741 (patch)
tree82954726ac8d9c400610c5b5ac76904d29f5f69d /src/js/plyr.js
parent1f1d74ba50f2ac4113948a3b92a0b55f05b735c2 (diff)
parentdf458c5e7ae824fc0bf86462130ea9571229c273 (diff)
downloadplyr-e59fe1aacfcb1366cedcb1a65c4ad22f588f8741.tar.lz
plyr-e59fe1aacfcb1366cedcb1a65c4ad22f588f8741.tar.xz
plyr-e59fe1aacfcb1366cedcb1a65c4ad22f588f8741.zip
Merge branch 'develop' into a11y-improvements
# Conflicts: # dist/plyr.js # dist/plyr.js.map # dist/plyr.min.js # dist/plyr.min.js.map # dist/plyr.polyfilled.js # dist/plyr.polyfilled.js.map # dist/plyr.polyfilled.min.js # dist/plyr.polyfilled.min.js.map # src/js/listeners.js
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index c15e83cb..9f3def07 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -554,7 +554,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,8 +562,7 @@ class Plyr {
* @param {boolean} step - How much to decrease by (between 0 and 1)
*/
decreaseVolume(step) {
- const volume = this.media.muted ? 0 : this.volume;
- this.volume = volume - (is.number(step) ? step : 1);
+ this.increaseVolume(-step);
}
/**