Replaced button press sound

This commit is contained in:
Dennis Postma 2025-02-06 21:05:29 +01:00
parent c2d41a63a7
commit c09e9ea841
3 changed files with 2 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -44,10 +44,8 @@ watch(
// #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
addEventListener('click', (event) => {
if (!(event.target instanceof HTMLButtonElement)) {
return
}
const audio = new Audio('/assets/sounds/click-btn.mp3')
if (!(event.target instanceof HTMLButtonElement)) return
const audio = new Audio('/assets/sounds/button-click.wav')
audio.play()
})