fix: await first playBeep in sound sequences

This commit is contained in:
Mikhail Kiselev
2026-02-10 16:53:40 +03:00
parent 906f504d49
commit 482786a34b
2 changed files with 8 additions and 8 deletions

View File

@@ -67,7 +67,7 @@
}
}
function testSound(name) {
async function testSound(name) {
// If custom sound exists, play it
if (customSounds[name]) {
playCustomSound(name)
@@ -77,16 +77,16 @@
// Otherwise play default beep sounds
switch (name) {
case 'warning':
playBeep(880, 0.15)
await playBeep(880, 0.15)
setTimeout(() => playBeep(880, 0.15), 200)
break
case 'timeup':
playBeep(1200, 0.2)
await playBeep(1200, 0.2)
setTimeout(() => playBeep(900, 0.2), 250)
setTimeout(() => playBeep(600, 0.3), 500)
break
case 'meeting_end':
playBeep(523, 0.2)
await playBeep(523, 0.2)
setTimeout(() => playBeep(659, 0.2), 200)
setTimeout(() => playBeep(784, 0.4), 400)
break