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
Copy file name to clipboardExpand all lines: articles/communication-services/tutorials/call-readiness/call-readiness-tutorial-part-2-requesting-device-access.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,13 @@ Access the full code for this tutorial on [GitHub](https://github.com/Azure-Samp
26
26
## Requesting access to the camera and microphone
27
27
28
28
For calling applications, it's often vital a user has given permission to use the microphone and camera.
29
-
In this section, we create a series of components that will encourage the user to grant access to the camera and microphone.
29
+
In this section, we create a series of components that encourages the user to grant access to the camera and microphone.
30
30
We display prompts to the user to guide them through granting access.
31
31
We inform the user with a prompt if access isn't granted.
32
32
33
33
### Creating prompts for camera and microphone access
34
34
35
-
We first create a series of device permissions prompts to get users into a state where they've accepted the microphone and camera permissions. These prompts will use the `CameraAndMicrophoneSitePermissions` component
35
+
We first create a series of device permissions prompts to get users into a state where they've accepted the microphone and camera permissions. These prompts use the `CameraAndMicrophoneSitePermissions` component
36
36
from the UI Library. Like the Unsupported Browser prompt, we host these prompts inside a FluentUI `modal`.
Here we add two new utility functions to check and request for camera and microphone access. Create a file called `devicePermissionUtils.ts` with two functions `checkDevicePermissionsState` and `requestCameraAndMicrophonePermissions`.
74
-
`checkDevicePermissionsState`will use the [PermissionAPI](https://developer.mozilla.org/docs/Web/API/Permissions_API). However, querying for camera and microphone isn't supported on Firefox and thus we ensure this method returns `unknown` in this case. Later we ensure we handle the `unknown` case when prompting the user for permissions.
74
+
`checkDevicePermissionsState`uses the [PermissionAPI](https://developer.mozilla.org/docs/Web/API/Permissions_API). However, querying for camera and microphone isn't supported on Firefox and thus we ensure this method returns `unknown` in this case. Later we ensure we handle the `unknown` case when prompting the user for permissions.
75
75
76
76
`src/DevicePermissionUtils.ts`
77
77
@@ -84,7 +84,7 @@ import { StatefulCallClient } from "@azure/communication-react";
84
84
*
85
85
* @remarks
86
86
* The Permissions API we are using is not supported in Firefox, Android WebView or Safari < 16.
0 commit comments