ensureReady
Browsers suspend the AudioContext until a user gesture. ensureReady resumes it. Safe to call multiple times - resolves immediately if already running.
import { ensureReady } from "@web-kits/audio";
button.addEventListener("click", async () => {
await ensureReady();
play();
});Signature
function ensureReady(): Promise<void>;Call this early - ideally on the first user interaction. It's a no-op if the context is already in the "running" state.