Skip to content

Commit

Permalink
@gkatsev checked muted status when updating volume bar level. closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Jan 26, 2016
1 parent 6317395 commit 8a17313
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

--------------------

Expand Down
9 changes: 7 additions & 2 deletions src/js/control-bar/volume-control/volume-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand All @@ -71,6 +74,7 @@ class VolumeBar extends Slider {
* @method stepForward
*/
stepForward() {
this.checkMuted();
this.player_.volume(this.player_.volume() + 0.1);
}

Expand All @@ -80,6 +84,7 @@ class VolumeBar extends Slider {
* @method stepBack
*/
stepBack() {
this.checkMuted();
this.player_.volume(this.player_.volume() - 0.1);
}

Expand Down

0 comments on commit 8a17313

Please # to comment.