MCPcopy
hub / github.com/stemdeckapp/stemdeck / ensureAudioCtx

Function ensureAudioCtx

static/mobile/app.js:40–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38// programmatic play() calls work even outside a gesture.
39let audioCtx = null;
40function ensureAudioCtx() {
41 const AC = window.AudioContext || window.webkitAudioContext;
42 if (!AC) return null;
43 if (!audioCtx) audioCtx = new AC();
44 if (audioCtx.state === "suspended") audioCtx.resume().catch(() => {});
45 return audioCtx;
46}
47
48
49const ICON = {

Callers 3

openTrackFunction · 0.85
togglePlayFunction · 0.85
app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected