#49717: fix: address upstream Chromium shift to enable CoreAudio Tap API for audio capture used in electron's desktopCapturer (🍏 macOS).
Description of Change
Refs #49607
-
This PR adds the
NSAudioCaptureUsageDescriptionInfo.plist key required for electron apps to usedesktopCapturer. The key enables Apple's newerCoreAudio Tap APIwhich is the new goto for chromium's plumbing responsible fordesktopCapturer1e3df01 -
Updates documentation for
desktopCapturerpage to bring it up to date with macOS developments. Page has been out of date since macOS 13 when Apple introduced methods for audio-capture w/o a signed kernel extension. bc35ff5 -
Retro-actively adds a breaking change to the
V39.0.0 Breaking Changessection. Breaking change is related to chromium's use of native Apple APIs used in audio capture. bc35ff5 -
Minor lint fix that was tripping up pre-commit hook when I went to add aforementioned docs changes. bc35ff5
🍎 : CoreAudio Tap API Reference
The new plist key is a required permission to use electron's desktopCapturer properly on macOS >= 14.2 && electron >= 39.0.0-beta4.
Additional Context
Apple quietly released a new API for doing native audio-capture and then didn't communicate well down-stream that a new Info.plist permission NSAudioCaptureUsageDescription is required.
Hope inclusion of config added in this PR can aid in downstream adoption and awareness of the new permission 🤝
In the Chromium version jump for v39.0.0-beta.4 they make the new native Apple audio API the default. So desktopCapturer abruptly stops working without the new plist entry in that version and higher. This is b/c chromium has effectively retired the old native API which didn't have plist key reqs. No fallback to the old system exists if the new system fails.
Related Website PR : electron/website#1010
Checklist
- PR description included
- I have built and tested this PR
-
npm testpasses - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Addressed upstream Chromium shift to enable CoreAudio Tap API for audio capture used in electron's desktopCapturer (🍏 macOS).
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron