fix: add AudioContext resume in main timer

This commit is contained in:
Mikhail Kiselev
2026-02-10 16:23:30 +03:00
parent 809f64b93d
commit 5fd85bfc50

View File

@@ -122,6 +122,9 @@
function playBeep(frequency, duration, type = 'sine') { function playBeep(frequency, duration, type = 'sine') {
try { try {
const ctx = getAudioContext() const ctx = getAudioContext()
if (ctx.state === 'suspended') {
ctx.resume()
}
const oscillator = ctx.createOscillator() const oscillator = ctx.createOscillator()
const gainNode = ctx.createGain() const gainNode = ctx.createGain()