Make decreaseVolume wrap increaseVolume for code reuse

This commit is contained in:
Albin Larsson 2018-06-19 16:29:52 +02:00
parent 43879e08f4
commit 39c7bd40c2

View File

@ -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);
}
/**