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/resources/troubleshooting/voice-video-calling/device-issues/ask-device-permission-api-takes-too-long.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,20 @@ ms.subservice: calling
13
13
---
14
14
15
15
# The askDevicePermission API takes too long
16
-
The [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest&preserve-view=true#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API has the end user is shown a browser prompt asking if they allow permission to use (camera or microphone).
17
-
If the end users approves to use their camera or microphone, then those devices are available to be used in a call and their availability are reflected in available device list.
18
-
If you find that this API is taking a long time to respond, it could be due to delays in the end user approving the permission prompt user interface.
16
+
The [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest&preserve-view=true#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API prompts the end user via the browser asking if they allow permission to use camera or microphone.
17
+
If the end users approves camera or microphone usage, then those devices are available to be used in a call. The devices availability is reflected in available device list.
18
+
19
+
User taking a long time to approve the permission can cause delay in the API response.
19
20
20
21
Occasionally, the device list update step can take a long time.
21
-
This issue is usually because the driver layer responds late, which can happen with some virtual audio devices in particular. [Chromium Issue 1402866](https://bugs.chromium.org/p/chromium/issues/detail?id=1402866&no_tracker_redirect=1)
22
+
This issue is usually caused by a delay in the driver layer. The issue can happen with some virtual audio devices in particular. [Chromium Issue 1402866](https://bugs.chromium.org/p/chromium/issues/detail?id=1402866&no_tracker_redirect=1)
22
23
23
24
## How to detect using the SDK
24
25
To detect this issue, you can measure the time difference between when you call the [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest&preserve-view=true#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API and when the promise resolves or rejects.
25
26
26
27
## How to mitigate or resolve
27
-
If the [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest&preserve-view=true#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API fails due to the user not responding to the permission prompt UI,
28
-
the application can retry the API again and the user should see the permission prompt UI.
28
+
If the [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest&preserve-view=true#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API fails due to the user not responding to the UI permission prompt,
29
+
the application can retry the API again and the user should see the UI permission prompt .
29
30
30
31
If the device list update step takes a long time, the user should check their audio device list and see if there's any device that could potentially be causing this issue.
31
32
They may need to update or remove the problematic device to resolve the issue.
0 commit comments