Browse Source

Grant camera/microphone permission to macOS Catalina

pull/2628/head
Ramiro Saenz 5 years ago
parent
commit
2ae71facd5
  1. 5
      app/Application.js
  2. 8
      package.json
  3. 0
      resources/installer/entitlements.mac.plist

5
app/Application.js

@ -70,15 +70,14 @@ Ext.define('Rambox.Application', {
'->'
,{
xtype: 'label'
,html: '<b>Rambox Pro needs permissions to use Microphone and Camera for the apps.</b>'
,html: '<b>Rambox CE needs permissions to use Microphone and Camera for the apps.</b>'
}
,{
xtype: 'button'
,text: 'Grant permissions'
,ui: 'decline'
,handler: async function(btn) {
await require('electron').remote.systemPreferences.askForMediaAccess('microphone');
await require('electron').remote.systemPreferences.askForMediaAccess('camera');
ipc.send('grantPermissions');
Ext.cq1('app-main').removeDocked(btn.up('toolbar'), true);
}
}

8
package.json

@ -74,11 +74,11 @@
"target": [
"default"
],
"entitlements": "entitlements.mac.plist",
"entitlementsInherit": "entitlements.mac.plist",
"entitlements": "resources/installer/entitlements.mac.plist",
"entitlementsInherit": "resources/installer/entitlements.mac.plist",
"extendInfo": {
"NSMicrophoneUsageDescription": "Apps inside Rambox may need access to your microphone. Please, grant access to have a better experience.",
"NSCameraUsageDescription": "Apps inside Rambox may need access to your camera. Please, grant access to have a better experience."
"NSMicrophoneUsageDescription": "Apps inside Rambox CE may need access to your microphone. Please, grant access to have a better experience.",
"NSCameraUsageDescription": "Apps inside Rambox CE may need access to your camera. Please, grant access to have a better experience."
}
},
"dmg": {

0
entitlements.mac.plist → resources/installer/entitlements.mac.plist

Loading…
Cancel
Save