Skip to content

Commit

Permalink
feat(FEC-8294): toggle unmute on volume icon click when volume was de…
Browse files Browse the repository at this point in the history
…creased to zero via dragging (#353)
  • Loading branch information
odedhutzler committed Feb 27, 2019
1 parent 2a8bb26 commit 9c391f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/volume/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,14 @@ class VolumeControl extends BaseComponent {
* @memberof VolumeControl
*/
onVolumeControlButtonClick(): void {
this.logger.debug(`Toggle mute. ${this.player.muted} => ${!this.player.muted}`);
this.player.muted = !this.player.muted;
if (this.player.volume == 0) {
this.logger.debug(`Toggle mute. Volume is 0, set mute to false & volume to 0.5`);
this.player.muted = false;
this.player.volume = 0.5;
} else {
this.logger.debug(`Toggle mute. ${this.player.muted} => ${!this.player.muted}`);
this.player.muted = !this.player.muted;
}
this.notifyClick();
}

Expand Down

0 comments on commit 9c391f2

Please sign in to comment.