fix bug: SPACE also mutes/unmutes audio because of keyboard focus

This commit is contained in:
TabascoEye 2021-04-19 14:48:44 +02:00 committed by Thomas Basler
parent b586ef79ad
commit fa813884c0

View File

@ -141,6 +141,9 @@ class AudioManager {
this.audioPlayerElem.play();
const muteElem = HtmlUtils.getElementByIdOrFail<HTMLInputElement>('audioplayer_mute');
muteElem.onmousedown = (ev: Event) => {
ev.preventDefault();
}
muteElem.onclick = (ev: Event) => {
this.muted = !this.muted;
this.changeVolume();