Replaced button press sound
This commit is contained in:
parent
c2d41a63a7
commit
c09e9ea841
BIN
public/assets/sounds/button-click.wav
Normal file
BIN
public/assets/sounds/button-click.wav
Normal file
Binary file not shown.
Binary file not shown.
@ -44,10 +44,8 @@ watch(
|
|||||||
// #209: Play sound when a button is pressed
|
// #209: Play sound when a button is pressed
|
||||||
// @TODO: Not all button-like elements will actually be a button, so we need to find a better way to do this
|
// @TODO: Not all button-like elements will actually be a button, so we need to find a better way to do this
|
||||||
addEventListener('click', (event) => {
|
addEventListener('click', (event) => {
|
||||||
if (!(event.target instanceof HTMLButtonElement)) {
|
if (!(event.target instanceof HTMLButtonElement)) return
|
||||||
return
|
const audio = new Audio('/assets/sounds/button-click.wav')
|
||||||
}
|
|
||||||
const audio = new Audio('/assets/sounds/click-btn.mp3')
|
|
||||||
audio.play()
|
audio.play()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user