From d6ba1421fa31c0153d7cec3e32244067e8d9de88 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 16 Apr 2019 15:52:37 -0700 Subject: [PATCH] docs: note desktop audio limitation on macOS (#17815) --- docs/api/desktop-capturer.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api/desktop-capturer.md b/docs/api/desktop-capturer.md index 71d8d263fd7e0..3834e031e71c5 100644 --- a/docs/api/desktop-capturer.md +++ b/docs/api/desktop-capturer.md @@ -92,3 +92,9 @@ objects, each `DesktopCapturerSource` represents a screen or an individual windo 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`. \ No newline at end of file