Make decreaseVolume wrap increaseVolume for code reuse
This commit is contained in:
parent
43879e08f4
commit
39c7bd40c2
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user