diff options
| author | mehekj <mehek.jethani@gmail.com> | 2022-03-12 16:40:40 -0500 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2022-03-12 16:40:40 -0500 |
| commit | e474d02cf51c5e20e42baa6b7d9c4aeb4ab51967 (patch) | |
| tree | 255af51acbfb6acb7b6ec1707fc611963de033c9 /src/client/views/nodes/AudioBox.tsx | |
| parent | 017016a8de25709b11febb0252b57824339e9151 (diff) | |
video ui in progress, basic functions show up
Diffstat (limited to 'src/client/views/nodes/AudioBox.tsx')
| -rw-r--r-- | src/client/views/nodes/AudioBox.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index c33a74325..b9046b61e 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -421,6 +421,9 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp @action setVolume = (volume: number) => { if (this._ele) { + if (this._muted) { + this._muted = false; + } this._volume = volume; this._ele.volume = volume; } @@ -503,10 +506,10 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp <div className="audiobox-button" title={this._muted ? "unmute" : "mute"} onPointerDown={this.toggleMute}> - <FontAwesomeIcon icon={this._muted ? "volume-mute" : "volume-up"} /> + <FontAwesomeIcon icon={this._muted || this._volume == 0 ? "volume-mute" : "volume-up"} /> </div> <input type="range" step="0.1" min="0" max="1" value={this._muted ? 0 : this._volume} - className="toolbar-slider" id="volume-slider" + className="toolbar-slider volume" onPointerDown={(e: React.PointerEvent) => { e.stopPropagation(); }} onChange={(e: React.ChangeEvent<HTMLInputElement>) => { this.setVolume(Number(e.target.value)) }} /> |
