docs: note desktop audio limitation on macOS (#17738)

Closes #10515. Notes fundamental limitation in `navigator.mediaDevices.getUserMedia` for audio capture on some platforms so that users are aware of the ongoing issue and provides a potential workaround.
This commit is contained in:
Shelley Vohr 2019-04-16 10:49:31 -07:00 committed by GitHub
parent a7e22c78cf
commit b3d8db6996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,3 +119,9 @@ captured.
Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`DesktopCapturerSource`](structures/desktop-capturer-source.md) objects, each `DesktopCapturerSource` represents a screen or an individual window that can be captured.
[`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia
### Caveats
`navigator.mediaDevices.getUserMedia` does not work on macOS for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this.
It is possible to circumvent this limitation by capturing system audio with another macOS app like Soundflower and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`.