Requests the native OS microphone permission when running inside Electron.
On macOS, microphone access has two independent gates: Chromium's per-origin
permission (granted by the app's session permission handler) and the OS-level
TCC permission, which is only obtainable via
systemPreferences.askForMediaAccess. Without the OS grant,
enumerateDevices() returns no usable inputs even though getUserMedia
resolves at the Chromium layer — surfacing as "No microphones found".
This triggers the native prompt once (per mount) via the preload-exposed
window.electronAPI. It is a no-op in a normal browser. Device enumeration
self-heals through the devicechange listener in useAudioDevices once
access is granted.
Parameters
enabled: boolean = true
Gate the request (e.g. only when the record surface is visible)
so the prompt isn't shown before the user intends to record.
Requests the native OS microphone permission when running inside Electron.
On macOS, microphone access has two independent gates: Chromium's per-origin permission (granted by the app's session permission handler) and the OS-level TCC permission, which is only obtainable via
systemPreferences.askForMediaAccess. Without the OS grant,enumerateDevices()returns no usable inputs even thoughgetUserMediaresolves at the Chromium layer — surfacing as "No microphones found".This triggers the native prompt once (per mount) via the preload-exposed
window.electronAPI. It is a no-op in a normal browser. Device enumeration self-heals through thedevicechangelistener inuseAudioDevicesonce access is granted.