Electron version: 19.0.3
I have an Electron app which uses microphone input via the web audio APIs. The app works perfectly fine on most machines but on some Windows machines I get the following error in the render process console when trying to read from the microphone:
DOMException: Could not start audio source
This occurs on computers that (as far as I can tell) have the correct 'Microphone privacy settings' (which can seen in Settings -> Sound -> Microphone privacy settings).
This means that the setting Allow apps to access your microphone is enabled as is the setting that allows non-Microsoft store apps to access the microphone.
Interestingly on the machines where this happens, the app is not added to the list of desktop applications that have accessed the microphone and, unlike macOS, there appears to be no way of adding applications to the list.
The issue has occurred on systems where the user has permissions to install new applications but does not have permission to disable the microphone - this setting is limited to administrators. Although that is not exclusively the case - I have also seen the issue on systems where the user has full permissions.
Is there some Electron app configuration that I should be bundling with the app to solve the issue? Something similar to entitlements.plist for macOS apps? Or is this a Windows related issue?