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
*`type` String - The type of media to which you are requesting access. Can be `microphone`or `camera`.
125
+
Returns `Promise<String>` - Current permission status; can be `authorized`, `denied`, or `restricted`.
126
126
127
-
Returns `Promise<String>` - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
127
+
Checks the authorization status for camera access. If the status check returns:
128
+
129
+
-`not determined`, the camera access authorization will prompt the user to authorize or deny. The Promise is resolved after the user selection with either `authorized` or `denied`.
130
+
-`denied`, the `Security & Privacy` System Preferences window is opened with the Camera privacy key highlighted. On open of the `Security & Privacy` window, the Promise is resolved as `denied`.
131
+
-`restricted`, the Promise is resolved as `restricted`.
128
132
129
-
Your app must provide an explanation for its use of capture devices using the `NSCameraUsageDescription`or `NSMicrophoneUsageDescription``Info.plist`keys; Calling this method or attempting to start a capture session without a usage description raises an exception.
133
+
Your app must provide an explanation for its use of capture devices using the `NSCameraUsageDescription``Info.plist`key; Calling this method or attempting to start a capture session without a usage description raises an exception.
130
134
131
135
```
132
-
<key>`NSCameraUsageDescription</key>
136
+
<key>NSCameraUsageDescription</key>
133
137
<string>Your reason for wanting to access the Camera</string>
134
-
<key>`NSMicrophoneUsageDescription</key>
138
+
```
139
+
140
+
**Note:**
141
+
142
+
-`status` will be resolved back as `authorized` prior to macOS 10.14 High Sierra, as access to the camera and microphone was unilaterally allowed until that version.
Returns `Promise<String>` - Current permission status; can be `authorized`, `denied`, or `restricted`.
155
+
156
+
Checks the authorization status for microphone access. If the status check returns:
157
+
158
+
-`not determined`, the microphone access authorization will prompt the user to authorize or deny. The Promise is resolved after the user selection with either `authorized` or `denied`.
159
+
-`denied`, the `Security & Privacy` System Preferences window is opened with the Microphone privacy key highlighted. On open of the `Security & Privacy` window, the Promise is resolved as `denied`.
160
+
-`restricted`, the Promise is resolved as `restricted`.
161
+
162
+
Your app must provide an explanation for its use of capture devices using the `NSMicrophoneUsageDescription``Info.plist` key; Calling this method or attempting to start a capture session without a usage description raises an exception.
163
+
164
+
```
165
+
<key>NSMicrophoneUsageDescription</key>
135
166
<string>Your reason for wanting to access the Microphone</string>
136
167
```
137
168
138
-
**Note:**`status` will be resolved back as `authorized` prior to macOS 10.14 High Sierra, as access to the camera and microphone was unilaterally allowed until that version.
169
+
**Note:**
170
+
171
+
-`status` will be resolved back as `authorized` prior to macOS 10.14 High Sierra, as access to the camera and microphone was unilaterally allowed until that version.
0 commit comments