You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktopCapturer: Use ScreenCaptureKit API to enable capturing loopback audio on macOS #47490
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
For many years now, it has not been possible to capture loopback audio in Electron apps running on macOS. It requires installing an audio driver during install-time, which is a terrible thing for the end user. It's also a terrible thing for the dev since they have to figure out codesigning for the driver and bundling it correctly in the PKG installer.
Proposed Solution
For supported macOS versions, enable loopback audio in desktopCapturer on macOS by using the ScreenCaptureKit API to request a stream of system audio. This will probably involve bundling and distributing a codesigned Swift app or Obj-C binary.
Thanks for the suggestion! Does Chromium use/support that API yet? If I'm not mistaken, Electron just plugs into Chromium APIs. So if Chromium doesn't support it yet, Chromium would first need to support it before Electron can.
Thanks for the suggestion! Does Chromium use/support that API yet? If I'm not mistaken, Electron just plugs into Chromium APIs. So if Chromium doesn't support it yet, Chromium would first need to support it before Electron can.
Unfortunately, Chromium doesn't support it yet. I was thinking we could be a little sneaky and just include our own signed binary specifically for macOS loopback audio capture hooked into desktopCapturer's API.
Are there any other cases where we currently do something similar in the codebase (eg. polyfill missing [desired] Chromium functionalities)?
Activity
nikwen commentedon Jun 17, 2025
Thanks for the suggestion! Does Chromium use/support that API yet? If I'm not mistaken, Electron just plugs into Chromium APIs. So if Chromium doesn't support it yet, Chromium would first need to support it before Electron can.
alectrocute commentedon Jun 17, 2025
Thanks @nikwen!
Unfortunately, Chromium doesn't support it yet. I was thinking we could be a little sneaky and just include our own signed binary specifically for macOS loopback audio capture hooked into
desktopCapturer's API.Are there any other cases where we currently do something similar in the codebase (eg. polyfill missing [desired] Chromium functionalities)?
nikwen commentedon Jun 17, 2025
I'm not familiar enough with that code to tell if it's a viable path.
My suggestion would be to file an upstream bug with Chromium.
nikwen commentedon Jun 17, 2025
Does the code from this comment make it work for you?
#42605 (comment)
If yes, we might need to update the docs.
EDIT: See also the comments from this file:
alectrocute commentedon Jun 18, 2025
@nikwen Made a PR to improve docs: #47493
MarshallOfSound commentedon Aug 11, 2026
System audio loopback works on macOS 14.2+ as of 39 (#49717), it uses CoreAudio taps rather than SCK but that's an implementation detail.
feat(recording): record the system output on macOS 14.2+ with Electro…
docs: rfc for meetings computer-audio capture (kirodotdev#2814)