Skip to content

Commit c6f78d3

Browse files
authored
update 8
1 parent f696e5c commit c6f78d3

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The following user-facing diagnostics are available:
7676

7777
## Accessing diagnostics
7878

79-
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) API. You can understand more about the `UserFacingDiagnosticsFeature` interface [here](/javascript/api/azure-communication-services/@azure/communication-calling/userfacingdiagnosticsfeature?view=azure-communication-services-js).
79+
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).
8080

8181
```js
8282
const userFacingDiagnostics = call.feature(Features.UserFacingDiagnostics);
@@ -118,6 +118,15 @@ userFacingDiagnostics.media.on('diagnosticChanged', diagnosticChangedListener);
118118
```
119119

120120
## Accessing Remote User Facing Diagnostic events
121+
To send remote UFDs to all participants on a call, you must first UDF's to sent. You enable or disable this on a per client basis. Once activated, the client will begin transmitting its local UFDs remotely to all participants for their consumption and processing. Please note that when the number of participants on a call exceeds 20, the transmission of remote UFDs from the local client will cease. This measure is in place to prevent excessive consumption of network bandwidth due to UFD traffic.
122+
123+
```js
124+
// Start the local client to send its local UFD to all participants (send local UFD to remote clients).
125+
remoteUfdsFeature.startSendingDiagnostics();
126+
// Stop sending local UFDs to remote clients.
127+
remoteUfdsFeature.stopSendingDiagnostics();
128+
```
129+
121130
RemoteParticipantDiagnosticsData has the following data
122131
- diagnostic contains array of diagnostics UFD that have been fired off on a remote machines. For example a UFD of `NetworkSendQuality`.
123132
- value is `DiagnosticQuality` or `DiagnosticFlag`:
@@ -144,15 +153,10 @@ const remoteDiagnosticChangedListener = (diagnosticInfo: RemoteParticipantDiagno
144153

145154
// Subscribe to the `diagnosticChanged` event to monitor when any local user-facing diagnostic changes.
146155
userFacingDiagnostics.remote.on('diagnosticChanged', remoteDiagnosticChangedListener);
147-
148-
// Start sending local UFDs to remote clients. Must call this API so that local UFDs can start sending out and remote clients can receive them.
149-
remoteUfdsFeature.startSendingDiagnostics();
150-
// Stop sending local UFDs to remote clients.
151-
remoteUfdsFeature.stopSendingDiagnostics();
152156
```
153157

154158

155-
## Raise the latest User Facing Diagnostics fired off
159+
## Raise the latest User Facing Diagnostics event that was received:
156160

157161
Here's sample code to generate the latest diagnostic value raised by the calling SDK. If a diagnostic is undefined, it means the UFD has not been raised.
158162

0 commit comments

Comments
 (0)