aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbin Larsson <mail@albinlarsson.com>2018-06-19 16:29:52 +0200
committerAlbin Larsson <mail@albinlarsson.com>2018-06-19 16:29:52 +0200
commit39c7bd40c205700e7b1df677b8aaacc6cb8100db (patch)
tree66470d90f5e04479e591af440632e55f46a681a8 /src
parent43879e08f44a5bb902b4dc0f8ccd1d3d6283b47d (diff)
downloadplyr-39c7bd40c205700e7b1df677b8aaacc6cb8100db.tar.lz
plyr-39c7bd40c205700e7b1df677b8aaacc6cb8100db.tar.xz
plyr-39c7bd40c205700e7b1df677b8aaacc6cb8100db.zip
Make decreaseVolume wrap increaseVolume for code reuse
Diffstat (limited to 'src')
-rw-r--r--src/js/plyr.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 9e00e836..374251e6 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -561,8 +561,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 : 0);
+ this.increaseVolume(-step);
}
/**