mirror of
https://github.com/videojs/video.js.git
synced 2025-01-02 06:32:07 +02:00
@gkatsev checked muted status when updating volume bar level. closes #3037
This commit is contained in:
parent
6317395e0c
commit
8a17313a3b
@ -7,6 +7,7 @@ CHANGELOG
|
||||
* @OwenEdwards Fixed volume menu keyboard access ([view](https://github.com/videojs/video.js/pull/3034))
|
||||
* @mister-ben made $primary-foreground-color a !default sass var ([view](https://github.com/videojs/video.js/pull/3003))
|
||||
* @OwenEdwards fixed double-localization of mute toggle control text ([view](https://github.com/videojs/video.js/pull/3017))
|
||||
* @gkatsev checked muted status when updating volume bar level ([view](https://github.com/videojs/video.js/pull/3037))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -44,11 +44,14 @@ class VolumeBar extends Slider {
|
||||
* @method handleMouseMove
|
||||
*/
|
||||
handleMouseMove(event) {
|
||||
this.checkMuted();
|
||||
this.player_.volume(this.calculateDistance(event));
|
||||
}
|
||||
|
||||
checkMuted() {
|
||||
if (this.player_.muted()) {
|
||||
this.player_.muted(false);
|
||||
}
|
||||
|
||||
this.player_.volume(this.calculateDistance(event));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,6 +74,7 @@ class VolumeBar extends Slider {
|
||||
* @method stepForward
|
||||
*/
|
||||
stepForward() {
|
||||
this.checkMuted();
|
||||
this.player_.volume(this.player_.volume() + 0.1);
|
||||
}
|
||||
|
||||
@ -80,6 +84,7 @@ class VolumeBar extends Slider {
|
||||
* @method stepBack
|
||||
*/
|
||||
stepBack() {
|
||||
this.checkMuted();
|
||||
this.player_.volume(this.player_.volume() - 0.1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user