'Electron desktopCapturer for MacOS

I need to stream audio in my electron app from the macOS, however, I have hit the following limitation. This is from the electron documentation:

https://www.electronjs.org/docs/latest/api/desktop-capturer

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. 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.

I do not want to use another macOS app like sunflower. Is there any easy way that I can update the kernel in the app to stream it? Similar to Discord? Can I easily build an SDK to do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source