Skip to content

Commit

Permalink
fix(FEC-7318): volume bar dragging (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dvir Hazout authored and Dan Ziv committed Oct 20, 2017
1 parent 8207d15 commit 9da3e1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/volume/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class VolumeControl extends BaseComponent {
this.player.addEventListener(this.player.Event.MUTE_CHANGE, () => {
this.props.updateMuted(this.player.muted);
});

document.addEventListener('mouseup', (e: any) => this.onVolumeProgressBarMouseUp(e));
document.addEventListener('mousemove', (e: any) => this.onVolumeProgressBarMouseMove(e));
}

/**
Expand Down Expand Up @@ -189,8 +192,6 @@ class VolumeControl extends BaseComponent {
className={style.bar}
ref={c => this._volumeProgressBarElement=c}
onMouseDown={() => this.onVolumeProgressBarMouseDown()}
onMouseUp={e => this.onVolumeProgressBarMouseUp(e)}
onMouseMove={e => this.onVolumeProgressBarMouseMove(e)}
>
<div className={style.progress} style={{height: this.getVolumeProgressHeight()}} />
</div>
Expand Down

0 comments on commit 9da3e1d

Please sign in to comment.