From 8a17313a3b3b3decc4f1fbf1ba85e08a7813671a Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 25 Jan 2016 19:41:58 -0500 Subject: [PATCH] @gkatsev checked muted status when updating volume bar level. closes #3037 --- CHANGELOG.md | 1 + src/js/control-bar/volume-control/volume-bar.js | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18dd0c7c0b..7ca658275e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) -------------------- diff --git a/src/js/control-bar/volume-control/volume-bar.js b/src/js/control-bar/volume-control/volume-bar.js index cf0026ba4e..bf775cd6cc 100644 --- a/src/js/control-bar/volume-control/volume-bar.js +++ b/src/js/control-bar/volume-control/volume-bar.js @@ -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); }