Commit 74c03e7
committed
fix(player): create AudioContext before resuming so first click plays
handlePlay called resumeAudio() before connectAudio(), but at that
point the module-level ctx in lib/audio.ts is still null — resumeAudio
returned Promise.resolve() and the gesture window was wasted on a
no-op. connectAudio() then created a fresh AudioContext in suspended
state, audio routed through its destination stayed silent, and the
listener had to click play a second time to get sound.
Reorder to: connectAudio (creates the context), resumeAudio (resumes
inside the same gesture), then el.play().1 parent 3acd51c commit 74c03e7
4 files changed
Lines changed: 17 additions & 15 deletions
File tree
- server/frontend
- dist
- assets
- src/entries
- src/pages
This file was deleted.
0 commit comments