wojtkowiak / meteor-desktop

Build a Meteor's desktop client with hot code push.
MIT License
448 stars 81 forks source link

navigator.mediaDevices microphone access not working #295

Open awgust-taylor opened 3 years ago

awgust-taylor commented 3 years ago

Hi wojkowiak or anyone else with the knowledge to assist,

I'm having a hard time understanding the docs for the microphone access. Microphone works in browser and android but not from within the meteor-desktop electron app, why?

Is there a setting in the settings.json or desktop.js I am missing?

Has anyone else gotten the microphone audio to work from within the electron app?

Tried just about every fix found via search engine.

Thanks in advance hey.

linegel commented 2 years ago

Hi @awgust-taylor! First question, do you talk about win or macos? I suppose the second one, and if so,

  1. Go to .desktop/build/entitlements.mac.plist (create the file in case there's no such file), content you would expect is something similar to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.security.device.audio-input</key>
    <true/>
  </dict>
</plist>
  1. You must check your .desktop/settings.json config. You will see something like:
"builderOptions": {
    ...
    "mac": {
         ...
      }
    ...
}

Into mac section you must add

"extendInfo": {
    "NSMicrophoneUsageDescription": "Explanation for user why you need it",
}