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-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,25 @@ author: enricohuang
6
6
ms.author: enricohuang
7
7
8
8
services: azure-communication-services
9
-
ms.date: 03/27/2024
9
+
ms.date: 03/29/2024
10
10
ms.topic: troubleshooting
11
11
ms.service: azure-communication-services
12
12
ms.subservice: calling
13
13
---
14
14
15
15
# The askDevicePermission API takes too long
16
-
The `askDevicePermission` API triggers the permission prompt and updates the device list internally.
17
-
If you find that this API is taking a long time, it could be due to delays in either step.
18
-
If the browser shows the permission prompt UI and the user doesn't respond for a while,
19
-
the ACS Web Calling SDK resolves the promise and returns the permission result.
16
+
The [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API will have the end user will be shown a browser prompt asking if they allow permission to use (camera or microphone).
17
+
If the end users aproves to use their camera or microphone then those devices will be available to be used in a call and their availability will be 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.
20
19
21
20
Occasionally, the device list update step can take a long time.
22
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)
23
22
24
-
## How to detect
25
-
### SDK
26
-
To detect this issue, you can measure the time difference between when you call the `askDevicePermission` API and when the promise resolves or rejects.
23
+
## How to detect using the SDK
24
+
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#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API and when the promise resolves or rejects.
27
25
28
26
## How to mitigate or resolve
29
-
If the `askDevicePermission` API fails due to the user not responding to the permission prompt UI,
27
+
If the [`askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API fails due to the user not responding to the permission prompt UI,
30
28
the application can retry the API again and the user should see the permission prompt UI.
31
29
32
30
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.
Copy file name to clipboardExpand all lines: articles/communication-services/resources/troubleshooting/voice-video-calling/device-issues/no-enumerated-microphone-list.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,34 +6,31 @@ author: enricohuang
6
6
ms.author: enricohuang
7
7
8
8
services: azure-communication-services
9
-
ms.date: 02/24/2024
9
+
ms.date: 03/29/2024
10
10
ms.topic: troubleshooting
11
11
ms.service: azure-communication-services
12
12
ms.subservice: calling
13
13
---
14
14
15
15
# The getMicrophones API doesn't return detailed microphone list
16
-
If a user reports that they can't see the detailed microphone list,
17
-
it's likely because the browser isn't granted permission to access the microphone.
16
+
If a user reports they can't see the detailed microphone list,
17
+
it's likely because the user didn't grant permission to access the microphone.
18
18
When the permission state is `prompt` or `denied`, the browser doesn't provide detailed information about the microphone devices.
19
-
In this scenario, the `DeviceManager.getMicrophones` API returns an array with one object, where the `id` is set to `microphone:` and the name is set to an empty string.
19
+
In this scenario, the [`DeviceManager.getMicrophones`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getmicrophones) API returns an array with one object, where the `id` is set to `microphone:` and the name is set to an empty string.
20
20
21
-
It's important to note that this scenario is different from the scenario where a user doesn't have any microphone device.
22
-
In the latter case, the `DeviceManager.getMicrophones` API only returns an empty array, indicating that there's no available microphone device in the user's system.
21
+
It's important to note that this scenario is different from the scenario where a user doesn't have any microphone on their device. If a device doesn't have any microphones the [`DeviceManager.getMicrophones`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getmicrophones) API returns an empty array, indicating that there's no available microphone devices on the user's system.
23
22
24
-
## How to detect
25
-
### SDK
26
-
`DeviceManager.getMicrophones` API returns an empty array or an array with an object, where the `id` is set to `microphone:` and the name is set to an empty string.
23
+
## How to detect using the SDK
24
+
[`DeviceManager.getMicrophones`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getmicrophones) API returns an empty array or an array with an object, where the `id` is set to `microphone:` and the name is set to an empty string.
27
25
28
26
Additionally, to detect the scenario where the user removes the microphone during the call and there are no available microphones in the system,
29
-
the application can listen to the `noMicrophoneDevicesEnumerated` bad event in the [User Facing Diagnostics Feature](../../../../concepts/voice-video-calling/user-facing-diagnostics.md).
27
+
the application can listen to the [`noMicrophoneDevicesEnumerated`](/javascript/api/azure-communication-services/@azure/communication-calling/latestmediadiagnostics?view=azure-communication-services-js#@azure-communication-calling-latestmediadiagnostics-nomicrophonedevicesenumerated) bad event in the [User Facing Diagnostics Feature](../../../../concepts/voice-video-calling/user-facing-diagnostics.md).
30
28
This event can help the application understand the current situation, so it can show a warning message on its UI accordingly.
31
29
32
30
## How to mitigate or resolve
33
-
The application should always call the `DeviceManager.askDevicePermission` API to ensure that the required permissions are granted.
34
-
If the user doesn't grant the microphone permission, the application should display a warning message on its UI.
31
+
Your application should always call the [`DeviceManager.askDevicePermission`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-askdevicepermission) API to ensure that the required permissions are granted.
32
+
If the user doesn't grant the microphone permission, your application should display a warning message on its user interface.
35
33
36
-
Additionally, the application should listen to the `noMicrophoneDevicesEnumerated` event and show a message when there are no available microphone devices.
34
+
Additionally, your application should listen to the [`noMicrophoneDevicesEnumerated`](/javascript/api/azure-communication-services/@azure/communication-calling/latestmediadiagnostics?view=azure-communication-services-js#@azure-communication-calling-latestmediadiagnostics-nomicrophonedevicesenumerated) event and show a message when there are no available microphone devices.
37
35
If the application provides a device selection page before the call,
38
-
it can also check whether the microphone list is empty and shows a warning accordingly indicating no mic devices available.
39
-
This way can help users understand what is happening.
36
+
it can also check whether the microphone list is empty and shows a warning accordingly indicating no mic devices available.
Copy file name to clipboardExpand all lines: articles/communication-services/resources/troubleshooting/voice-video-calling/device-issues/no-enumerated-speaker-list.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,20 +20,19 @@ The way browsers currently work may seem counterintuitive, as the permission to
20
20
The speaker and microphone enumeration shares the same permission information.
21
21
22
22
When the microphone permission state is `prompt` or `denied`, the browser doesn't provide detailed information about the microphone devices and speaker devices.
23
-
In this scenario, the `DeviceManager.getSpeakers` API returns an array with one object, where the `id` is set to `speaker:` and the name is set to an empty string.
23
+
In this scenario, thv [`DeviceManager.getSpeakers`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getspeakers) API returns an array with one object, where the `id` is set to `speaker:` and the name is set to an empty string.
24
24
25
-
Some platforms, such as iOS Safari, macOS Safari, or earlier versions of Firefox, don't support speaker enumeration.
25
+
Some platforms, such as iOS Safari, macOS Safari, or earlier versions of Firefox don't support speaker enumeration.
26
26
27
27
It's important to note that this scenario is different from the scenario where a user doesn't have any audio output device.
28
-
In the latter case, the `DeviceManager.getSpeakers` API only returns an empty array, indicating that there's no available audio output device in the user's system.
28
+
In the latter case, the [`DeviceManager.getSpeakers`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getspeakers) API only returns an empty array, indicating that there's no available audio output device in the user's system.
29
29
30
-
## How to detect
31
-
### SDK
32
-
`DeviceManager.getSpeakers` API returns an empty array or an array with an object, where the `id` is set to `speaker:` and the name is set to an empty string.
30
+
## How to detect using the SDK
31
+
[`DeviceManager.getSpeakers`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getspeakers) API returns an empty array or an array with an object, where the `id` is set to `speaker:` and the name is set to an empty string.
33
32
34
33
Additionally, to detect the scenario where the user removes the speaker during the call and there are no available audio output devices in the system, the application can listen to the `noSpeakerDevicesEnumerated` bad event in the [User Facing Diagnostics Feature](../../../../concepts/voice-video-calling/user-facing-diagnostics.md). This event can help the application understand the current situation, and show the warning message on its UI accordingly.
35
34
36
-
For the platform that doesn't support speaker enumeration, you get an error when calling `DeviceManager.getSpeakers` API.
35
+
For the platform that doesn't support speaker enumeration, you get an error when calling [`DeviceManager.getSpeakers`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getspeakers) API.
37
36
38
37
The error code/subcode is
39
38
@@ -46,7 +45,7 @@ The error code/subcode is
46
45
47
46
## How to mitigate or resolve
48
47
The application should always call the `DeviceManager.askDevicePermission` API to ensure that the required permissions are granted.
49
-
If the user doesn't grant the microphone permission, the application should show a warning on its UI, so the user knows that they aren't able to see the speaker device list.
48
+
If the user doesn't grant the microphone permission, the application should show a warning on its user interface, so the user knows that they aren't able to see the speaker device list.
50
49
51
-
The application should also check whether the speaker list is empty or handle the error when calling `DeviceManager.getSpeakers` API, and show a warning accordingly.
50
+
The application should also check whether the speaker list is empty or handle the error when calling [`DeviceManager.getSpeakers`](/javascript/api/azure-communication-services/@azure/communication-calling/devicemanager?view=azure-communication-services-js#@azure-communication-calling-devicemanager-getspeakers) API, and show a warning accordingly.
52
51
Additionally, the application should listen to the `noSpeakerDevicesEnumerated` event and show a message when there are no available speaker devices.
Copy file name to clipboardExpand all lines: articles/communication-services/resources/troubleshooting/voice-video-calling/device-issues/no-permission-prompt.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,26 @@ author: enricohuang
6
6
ms.author: enricohuang
7
7
8
8
services: azure-communication-services
9
-
ms.date: 02/24/2024
9
+
ms.date: 03/29/2024
10
10
ms.topic: troubleshooting
11
11
ms.service: azure-communication-services
12
12
ms.subservice: calling
13
13
---
14
14
15
15
# No permission prompt shows when calling askDevicePermission
16
-
If a user reports that they don't see any permission prompt, it may be because they have previously granted or denied permission and the browser caches the result.
16
+
If a user reports that they don't see any permission prompts, it may be because they have previously granted or denied permission and the browser caches the result.
17
17
18
18
Not showing the permission prompt isn't a problem if the browser has the required permission.
19
19
However, if the user can't see the device list, it could be because they denied permission before.
20
20
21
21
Another possible reason for the lack of a permission prompt is that the user's system doesn't have any microphone or camera devices available,
22
22
causing the browser to skip the prompt even if the permission state is set to `prompt`.
23
23
24
-
## How to detect
25
-
### SDK
24
+
## How to detect using the SDK
26
25
We can't detect whether the permission prompt actually shows or not, as this browser behavior can't be detected at JavaScript layer.
27
26
28
27
## How to mitigate or resolve
29
-
The application should check the result of `DeviceManager.askDevicePermission` API.
28
+
The application should check the result of [`DeviceManager.askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) API.
30
29
If the result is false, it may indicate that user denied the permission now or previously.
31
30
32
31
The application should show a warning message and ask the user to check their browser settings to ensure that correct permissions have been granted.
Copy file name to clipboardExpand all lines: articles/communication-services/resources/troubleshooting/voice-video-calling/device-issues/overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ author: enricohuang
6
6
ms.author: enricohuang
7
7
8
8
services: azure-communication-services
9
-
ms.date: 02/24/2024
9
+
ms.date: 03/29/2024
10
10
ms.topic: troubleshooting
11
11
ms.service: azure-communication-services
12
12
ms.subservice: calling
13
13
---
14
14
15
15
# Overview of device and permission issues
16
-
There are two different types of permissions in general: browser permission and system permission.
16
+
Within the WebJS calling SDK there are two general different types of permissions: browser permission and system permission.
17
17
When an application needs to access a user's audio or video input device, it requires permissions granted at both the browser and system level.
18
18
19
19
If an application doesn't have the required permission, it can't access the device,
@@ -23,7 +23,7 @@ To avoid these issues, it's important for users to grant the necessary permissio
23
23
If a user accidentally denies permission or needs to change their permissions later, they can usually do so through the browser settings.
24
24
25
25
The permission is also necessary for the application to retrieve detailed device list information.
26
-
The application can call `DeviceManager.askDevicePermission` to trigger the permission prompt UI.
26
+
The application can call [`DeviceManager.askDevicePermission`](/javascript/api/%40azure/communication-react/calladapterdevicemanagement?view=azure-node-latest#@azure-communication-react-calladapterdevicemanagement-askdevicepermission) to trigger the permission prompt UI.
27
27
However, the browser may cache the permission result and return it without showing the permission prompt UI.
28
28
If the permission result is `denied`, the user needs to update the permission through the browser settings.
0 commit comments