INNER CODE UNIT · TypeScript

requestAudioPermission

jo-duchan/tapflow · packages/audiotap-helper/src/index.ts:127

export function requestAudioPermission(wait = true): void {
  try {
    const app = ensureHelperApp()
    const flags = wait ? ['-W', '-n'] : ['-g', '-n']
    execFileSync('open', [...flags, '-a', app, '--args', '--request-permission'], { stdio: ['ignore', 'ignore', 'ignore'] })
  } catch (e) {
    if (wait) throw e // setup wants to surface it; agent-start priming is best-effort (never block startup)
    logger.warn(`audio permission priming skipped: ${e instanceof Error ? e.message : String(e)}`)
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…