Skip to content

Commit

Permalink
fix: fix click sound
Browse files Browse the repository at this point in the history
  • Loading branch information
eri24816 committed May 11, 2024
1 parent 60e060c commit acca952
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/ui_utils/soundManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { as } from "../utils"

export class SoundManager {
click: HTMLAudioElement;
Expand All @@ -7,8 +6,7 @@ export class SoundManager {
this.click.volume = 1;
}
playClick() {
let tmp = as(this.click.cloneNode(true),HTMLAudioElement)
tmp.volume = 1;
tmp.play()
this.click.currentTime = 0;
this.click.play()
}
}

0 comments on commit acca952

Please sign in to comment.