Skip to content

Commit 28be888

Browse files
authored
Merge pull request #302059 from sloanster/patch-37
Update user-facing-diagnostics-web.md
2 parents 7d1e1d2 + 510f504 commit 28be888

File tree

1 file changed

+86
-67
lines changed

1 file changed

+86
-67
lines changed

articles/communication-services/concepts/voice-video-calling/includes/user-facing-diagnostics-web.md

Lines changed: 86 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,16 @@ There are some minor differences in using **remote UFDs** and **local UFDs**. Th
3232
The following user-facing diagnostics are available:
3333

3434
### Network values
35-
36-
3735
| Name | Description | Possible values | Location | Use cases | Mitigation steps |
3836
| --- | --- | --- | --- | --- | --- |
3937
| noNetwork | There's no network available. | - Set to `True` when a call fails to start because there's no network available. <br/> - Set to `False` when there are ICE candidates present. | Local <br/> Remote | Device isn't connected to a network. | Ensure that the call has a reliable internet connection that can sustain a voice call. For more information, see the [Network optimization](../network-requirements.md#network-optimization) section. |
4038
| networkRelaysNotReachable | Problems with a network. | - Set to `True` when the network has some constraint that isn't allowing you to reach Azure Communication Services relays. <br/> - Set to `False` upon making a new call. | Local | When on an active call and the WiFi signal go on and off. | Ensure that firewall rules and network routing allow client to reach Microsoft turn servers. For more information, see the [Firewall configuration](../network-requirements.md#firewall-configuration) section. |
4139
| networkReconnect | The connection was lost and the client is reconnecting to the network. | - Set to`Bad` when the network is disconnected <br/> - Set to `Poor`when the media transport connectivity is lost <br/> - Set to `Good` when a new session is connected. | Local <br/> Remote | Low bandwidth, no internet | Ensure that the call has a reliable internet connection that can sustain a voice call. For more information, see the [Network bandwidth requirement](../network-requirements.md#network-bandwidth) section. |
4240
| networkReceiveQuality | An indicator regarding incoming stream quality. | - Set to `Bad` when there's a severe problem with receiving the stream. <br/> - Set to `Poor` when there's a mild problem with receiving the stream. <br/> - Set to `Good` when there's no problem with receiving the stream. | Local <br/> Remote | Low bandwidth | Ensure that the call has a reliable internet connection that can sustain a voice call. For more information, see the [Network bandwidth requirement](../network-requirements.md#network-bandwidth) section. Suggest that the end user turn-off their camera to conserve available internet bandwidth. |
4341
| networkSendQuality | An indicator regarding outgoing stream quality. | - Set to `Bad` when there's a severe problem with sending the stream. <br/> - Set to `Poor` when there's a mild problem with sending the stream. <br/> - Set to `Good` when there's no problem with sending the stream. | Local <br/> Remote | Low bandwidth | Ensure that the call has a reliable internet connection that can sustain a voice call. For more information, see the [Network bandwidth requirement](../network-requirements.md#network-bandwidth) section. Also, suggest that the end user turn-off their camera to conserve available internet bandwidth. |
42+
| serverConnection | It shows whether a remote participant has unexpectedly disconnected from the call due to server loosing connection to client. | - Set to `Bad` when there's a severe problem with sending the stream. <br/> - Set to `Good` when there's no problem with sending the stream. | Remote | No internet connection between client and server infrastructure | Ensure that the call has a reliable internet connection that can sustain a voice call. For more information, see the [Network bandwidth requirement](../network-requirements.md#network-bandwidth) section.|
4443

4544
### Audio values
46-
47-
4845
| Name | Description | Possible values | Location | Use cases | Mitigation steps |
4946
| --- | --- | --- | --- | --- | --- |
5047
| noSpeakerDevicesEnumerated | there's no audio output device (speaker) on the user's system. | - Set to `True` when there are no speaker devices on the system, and speaker selection is supported. <br/> - Set to `False` when there's a least one speaker device on the system, and speaker selection is supported. | Local | All speakers are unplugged | When value set to `True`, consider giving visual notification to end user that their current call session doesn't have any speakers available. |
@@ -55,8 +52,6 @@ The following user-facing diagnostics are available:
5552
| microphonePermissionDenied | there's low volume from device or it's almost silent on macOS. | - Set to `True` when audio permission is denied from the system settings (audio). <br/> - Set to `False` on successful stream acquisition. <br/> Note: This diagnostic only works on macOS. | Local | Microphone permissions are disabled in the Settings. | When value is set to `True`, give visual notification to end user that they didn't enable permission to use microphone for an Azure Communication Services call. |
5653

5754
### Camera values
58-
59-
6055
| Name | Description | Possible values | Location | Use cases | Mitigation steps |
6156
| --- | --- | --- | --- | --- | --- |
6257
| cameraFreeze | Camera stops producing frames for more than 5 seconds. | - Set to `True` when the local video stream is frozen. This diagnostic means that the remote side is seeing your video frozen on their screen or it means that the remote participants aren't rendering your video on their screen. <br/> - Set to `False` when the freeze ends and users can see your video as per normal. | Local <br/> Remote | The Camera was lost during the call, or bad network caused the camera to freeze. | When value is set to `True`, consider giving notification to end user that the remote participant network might be bad. Suggest that the user turn-off their camera to conserve bandwidth. For more information, see [Network bandwidth requirement](../network-requirements.md#network-bandwidth) section on needed internet abilities for an Azure Communication Services call. |
@@ -66,8 +61,6 @@ The following user-facing diagnostics are available:
6661
| cameraStoppedUnexpectedly | Camera malfunction | - Set to `True` when camera enters stopped state unexpectedly. <br/> - Set to `False` when camera starts to successfully send video stream again. | Local <br/> Remote | Check camera is functioning correctly. | When value is set to `True`, give visual notification to end user that their camera is possibly having problems. (When value is set back to `False` remove notification). |
6762

6863
### Miscellaneous values
69-
70-
7164
| Name | Description | Possible values | Location | Use cases | Mitigation Steps |
7265
| --- | --- | --- | :--- | --- | --- |
7366
| screenshareRecordingDisabled | System screen sharing was denied from the preferences in Settings. | - Set to `True` when screen sharing permission is denied from the system settings (sharing). <br/> - Set to `False` on successful stream acquisition. <br/> Note: This diagnostic only works on macOS.Chrome. | Local <br/> Remote | Screen recording is disabled in Settings. | When value is set to `True`, give visual notification to end user that they didn't enable permission to share their screen for an Azure Communication Services call. |
@@ -79,6 +72,85 @@ The following user-facing diagnostics are available:
7972

8073
User-facing diagnostics is an extended feature of the core [`Call`](/javascript/api/azure-communication-services/@azure/communication-calling/call?view=azure-communication-services-js&preserve-view=true) API. You can understand more about the `UserFacingDiagnosticsFeature` interface [here](/javascript/api/azure-communication-services/@azure/communication-calling/userfacingdiagnosticsfeature?view=azure-communication-services-js&preserve-view=true).
8174

75+
Here’s a comprehensive tree structure that maps out the `UserFacingDiagnosticsFeature` interface along with its related dependencies, properties, and methods. Each diagnostic module (Network, Media, Remote) has event listeners for changes and provides the latest diagnostic snapshot.
76+
77+
```
78+
UserFacingDiagnosticsFeature (Interface)
79+
├── Inherits: CallFeature
80+
├── Properties
81+
│ ├── network: NetworkDiagnostics
82+
│ ├── media: MediaDiagnostics
83+
│ └── remote: RemoteDiagnostics
84+
85+
├── Dependencies
86+
│ ├── NetworkDiagnostics
87+
│ │ ├── Methods
88+
│ │ │ ├── getLatest(): LatestNetworkDiagnostics
89+
│ │ │ ├── on('diagnosticChanged', listener): void
90+
│ │ │ └── off('diagnosticChanged', listener): void
91+
│ │ └── Types
92+
│ │ ├── NetworkDiagnosticChangedEventArgs
93+
│ │ │ ├── value: DiagnosticQuality | DiagnosticFlag
94+
│ │ │ ├── valueType: DiagnosticValueType
95+
│ │ │ └── diagnostic: NetworkDiagnosticType
96+
│ │ ├── NetworkDiagnosticType = keyof LatestNetworkDiagnostics
97+
│ │ └── LatestNetworkDiagnostics
98+
│ │ ├── networkReconnect?: LatestDiagnosticValue
99+
│ │ ├── networkReceiveQuality?: LatestDiagnosticValue
100+
│ │ ├── networkSendQuality?: LatestDiagnosticValue
101+
│ │ ├── noNetwork?: LatestDiagnosticValue
102+
│ │ └── networkRelaysNotReachable?: LatestDiagnosticValue
103+
│ │
104+
│ ├── MediaDiagnostics
105+
│ │ ├── Methods
106+
│ │ │ ├── getLatest(): LatestMediaDiagnostics
107+
│ │ │ ├── on('diagnosticChanged', listener): void
108+
│ │ │ └── off('diagnosticChanged', listener): void
109+
│ │ └── Types
110+
│ │ ├── MediaDiagnosticChangedEventArgs
111+
│ │ │ ├── value: DiagnosticQuality | DiagnosticFlag
112+
│ │ │ ├── valueType: DiagnosticValueType
113+
│ │ │ └── diagnostic: MediaDiagnosticType
114+
│ │ ├── MediaDiagnosticType = keyof LatestMediaDiagnostics
115+
│ │ └── LatestMediaDiagnostics
116+
│ │ ├── speakingWhileMicrophoneIsMuted?: LatestDiagnosticValue
117+
│ │ ├── noSpeakerDevicesEnumerated?: LatestDiagnosticValue
118+
│ │ ├── noMicrophoneDevicesEnumerated?: LatestDiagnosticValue
119+
│ │ ├── cameraFreeze?: LatestDiagnosticValue
120+
│ │ ├── cameraStartFailed?: LatestDiagnosticValue
121+
│ │ ├── cameraStartTimedOut?: LatestDiagnosticValue
122+
│ │ ├── capturerStartFailed?: LatestDiagnosticValue
123+
│ │ ├── microphoneNotFunctioning?: LatestDiagnosticValue
124+
│ │ ├── microphoneMuteUnexpectedly?: LatestDiagnosticValue
125+
│ │ ├── cameraStoppedUnexpectedly?: LatestDiagnosticValue
126+
│ │ ├── capturerStoppedUnexpectedly?: LatestDiagnosticValue
127+
│ │ ├── screenshareRecordingDisabled?: LatestDiagnosticValue
128+
│ │ ├── microphonePermissionDenied?: LatestDiagnosticValue
129+
│ │ └── cameraPermissionDenied?: LatestDiagnosticValue
130+
│ │
131+
│ └── RemoteDiagnostics
132+
│ ├── Properties
133+
│ │ └── isSendingDiagnosticsEnabled: boolean
134+
│ ├── Methods
135+
│ │ ├── startSendingDiagnostics(): void
136+
│ │ ├── stopSendingDiagnostics(): void
137+
│ │ ├── getLatest(): RemoteParticipantDiagnosticsData
138+
│ │ ├── on('diagnosticChanged', listener): void
139+
│ │ └── off('diagnosticChanged', listener): void
140+
│ └── Types
141+
│ ├── RemoteParticipantDiagnosticsData
142+
│ │ └── diagnostics: RemoteDiagnostic[]
143+
│ └── RemoteDiagnostic
144+
│ ├── participantId: string
145+
│ ├── rawId: string
146+
│ ├── remoteParticipant?: RemoteParticipant
147+
│ ├── diagnostic: NetworkDiagnosticType | MediaDiagnosticType | ServerDiagnosticType
148+
│ ├── value: DiagnosticQuality | DiagnosticFlag
149+
│ └── valueType: DiagnosticValueType
150+
│ └── ServerDiagnosticType = 'serverConnection'
151+
```
152+
153+
82154
To utilize user facing diagnostics, first thing you must do is instantiate the user facing diagnostics feature from the call.
83155
```js
84156
const userFacingDiagnostics = call.feature(Features.UserFacingDiagnostics);
@@ -126,9 +198,9 @@ To transmit remote UFDs to all participants on a call, you need to enable the fu
126198

127199
```js
128200
// Start the local client to send its local UFD to all remote participants (send local UFD to remote clients).
129-
remoteUfdsFeature.startSendingDiagnostics();
201+
userFacingDiagnostics.remote.startSendingDiagnostics();
130202
// Stop sending local UFDs to remote clients.
131-
remoteUfdsFeature.stopSendingDiagnostics();
203+
userFacingDiagnostics.remote.stopSendingDiagnostics();
132204
```
133205

134206
For the code sample below, `RemoteParticipantDiagnosticsData` has the following data associated with it:
@@ -255,60 +327,7 @@ console.log(
255327
Here's sample code to generate the latest Remote UFD value delivered to the calling SDK. If a diagnostic is undefined, it means the UFD hasn't been raised from the remote client SDK.
256328
```js
257329
const latestRemoteDiagnostics = userFacingDiagnostics.remote.getLatest();
258-
259-
console.log(
260-
`noNetwork: ${latestRemoteDiagnostics.noNetwork.value}, ` +
261-
`value type = ${latestRemoteDiagnostics.noNetwork.valueType}`
262-
);
263-
264-
console.log(
265-
`networkReconnect: ${latestRemoteDiagnostics.networkReconnect.value}, ` +
266-
`value type = ${latestRemoteDiagnostics.networkReconnect.valueType}`
267-
);
268-
269-
console.log(
270-
`networkReceiveQuality: ${latestRemoteDiagnostics.networkReceiveQuality.value}, ` +
271-
`value type = ${latestRemoteDiagnostics.networkReceiveQuality.valueType}`
272-
);
273-
274-
console.log(
275-
`networkSendQuality: ${latestRemoteDiagnostics.networkSendQuality.value}, ` +
276-
`value type = ${latestRemoteDiagnostics.networkSendQuality.valueType}`
277-
);
278-
279-
console.log(
280-
`cameraStartFailed: ${latestRemoteDiagnostics.cameraStartFailed.value}, ` +
281-
`value type = ${latestRemoteDiagnostics.cameraStartFailed.valueType}`
282-
);
283-
284-
console.log(
285-
`microphoneNotFunctioning: ${latestRemoteDiagnostics.microphoneNotFunctioning.value}, ` +
286-
`value type = ${latestRemoteDiagnostics.microphoneNotFunctioning.valueType}`
287-
);
288-
289-
console.log(
290-
`microphoneMuteUnexpectedly: ${latestRemoteDiagnostics.microphoneMuteUnexpectedly.value}, ` +
291-
`value type = ${latestRemoteDiagnostics.microphoneMuteUnexpectedly.valueType}`
292-
);
293-
294-
console.log(
295-
`cameraFreeze: ${latestRemoteDiagnostics.cameraFreeze.value}, ` +
296-
`value type = ${latestRemoteDiagnostics.cameraFreeze.valueType}`
297-
);
298-
299-
console.log(
300-
`cameraStartFailed: ${latestRemoteDiagnostics.cameraStartFailed.value}, ` +
301-
`value type = ${latestRemoteDiagnostics.cameraStartFailed.valueType}`
302-
);
303-
304-
console.log(
305-
`cameraStartTimedOut: ${latestRemoteDiagnostics.cameraStartTimedOut.value}, ` +
306-
`value type = ${latestRemoteDiagnostics.cameraStartTimedOut.valueType}`
307-
);
308-
309-
console.log(
310-
`cameraStoppedUnexpectedly: ${latestRemoteDiagnostics.cameraStoppedUnexpectedly.value}, ` +
311-
`value type = ${latestRemoteDiagnostics.cameraStoppedUnexpectedly.valueType}`
312-
);
313-
314-
```
330+
for (const diagnostic of latestRemoteDiagnostics.diagnostics) {
331+
console.error(`Remote participant ${diagnostic.participantId} diagnostic: ${diagnostic.diagnostic} = ${diagnostic.value}`);
332+
}
333+
```

0 commit comments

Comments
 (0)