Skip to content

Ask for System Audio Recording so macOS meetings record the call. - #106

Merged
angelrdavila merged 1 commit into
mainfrom
angel/macos-system-audio-fix-5318e3
Dec 2, 2026
Merged

angelrdavila merged 1 commit into
mainfrom
angel/macos-system-audio-fix-5318e3

Conversation

@angelrdavila

Copy link
Copy Markdown
Member

What changed

On macOS, meetings recorded only the mic: the log said capture: system audio started, then every heartbeat showed "system":"none". Three stacked causes:

  1. Missing permission. Electron 42 records system audio through a Core Audio tap, which needs System Audio Recording (kTCCServiceAudioCapture), not Screen Recording. Chromium only checks it and never prompts, so the track ended at once and Lyra was never listed in System Settings.
    • New native/mac/audiocapture.swift helper (status / request) via TCC's TCCAccessPreflight / TCCAccessRequest. ensureSystemAudioAsked() runs before answering getDisplayMedia, prompting only while macOS has never asked.
    • PermissionKind 'screen' → 'systemAudio'; Settings row, blocked warning, README, PLAN updated.
  2. Screen Recording needed for nothing. On macOS 14.2+ the display-media handler answers { video: request.frame, audio: 'loopback' }: the discarded video track is Lyra's own window. macOS before 14.2 (no tap) keeps the ScreenCaptureKit path with the primary screen and Screen Recording (usesAudioTap).
  3. pnpm dev asked the terminal. TCC asks the responsible app; Warp/Terminal/iTerm lack NSAudioCaptureUsageDescription, so macOS refused silently. pnpm dev now runs scripts/dev.cjs, which builds stale helpers and launches Electron through build/helpers/devlaunch (dev only) using responsibility_spawnattrs_setdisclaim, so macOS asks Electron.app.

Packaging ships audiocapture; release.yml fails if either shipped helper is missing.

How it was verified

  • macOS 26 (M2 Pro), Electron 42.11.18: from Warp, pnpm dev prompted for "Electron" and a meeting recorded system audio.
  • pnpm check (684 tests), pnpm smoke:ui (ui-smoke: ok), pnpm smoke pass.
  • Helpers build; audiocapture status prints not-determined on a fresh machine; devlaunch passes args and exit codes through.

Not verified

  • Packaged build (pnpm build:mac): prompt names "Lyra", Contents/Resources/audiocapture present, hardened runtime allows the TCC dlopen.
  • Windows (unchanged in intent) and macOS < 14.2 fallback were not run.
  • qa-test / eval runs from AGENTS.md for audio changes.
  • If macOS refuses without asking (packaged app missing the usage key), preflight still reads not-determined, so no "blocked" warning shows.

- Electron 42 records macOS system audio through a Core Audio tap, which needs System Audio
  Recording (kTCCServiceAudioCapture). Chromium only checks it, so the track ended at once and
  Lyra was never listed to allow. A new audiocapture helper reads and requests it.
- On macOS 14.2+ the display-media handler answers with Lyra's own window as the (discarded)
  video track, so Screen Recording is no longer needed. Older macOS keeps the ScreenCaptureKit
  path with the primary screen.
- `pnpm dev` launches Electron through a dev-only devlaunch helper that disclaims
  responsibility, so macOS asks Electron.app rather than the terminal (which can't be asked).
- The permission kind 'screen' becomes 'systemAudio' across Settings, the blocked warning and docs.
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lyra Ready Ready Preview Dec 2, 2026 6:17pm UTC

@angelrdavila
angelrdavila merged commit e87c00f into main Dec 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant