From e99c8b7d1b9d7ad576bb3709fec49e5370157759 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 11 Jan 2016 17:33:49 -0500 Subject: [PATCH] check muted status when updating volume bar --- src/js/control-bar/volume-control/volume-bar.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); }