From dfd33e58a5e6f830d60e978afad7348f7a16068d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 22 Aug 2024 13:27:44 +0900 Subject: feat(frontend): add minimal style to watch with audio play request --- frontend/app/.client/audio/AudioController.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'frontend/app/.client/audio/AudioController.ts') diff --git a/frontend/app/.client/audio/AudioController.ts b/frontend/app/.client/audio/AudioController.ts index 6ed6180..296f685 100644 --- a/frontend/app/.client/audio/AudioController.ts +++ b/frontend/app/.client/audio/AudioController.ts @@ -51,6 +51,17 @@ export class AudioController { }); } + async playDummySoundEffect(): Promise { + const audio = this.audioElements["good_1"]; + if (!audio) { + return; + } + audio.muted = true; + audio.currentTime = 0; + await audio.play(); + audio.muted = false; + } + async playSoundEffect(soundEffect: SoundEffect): Promise { const audio = this.audioElements[soundEffect]; if (!audio) { -- cgit v1.2.3-70-g09d2