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)
|
* @param {boolean} step - How much to decrease by (between 0 and 1)
|
||||||
*/
|
*/
|
||||||
decreaseVolume(step) {
|
decreaseVolume(step) {
|
||||||
const volume = this.media.muted ? 0 : this.volume;
|
this.increaseVolume(-step);
|
||||||
this.volume = volume - (is.number(step) ? step : 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user