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/concepts/voice-video-calling/includes/media-stats/media-stats-web.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ If you set the following values:
80
80
-`aggregatinInterval` = 60
81
81
-`dataPointsPerAggregation` = 1
82
82
83
-
The `summaryReported` event is raised every 60 seconds and contains 1 unique unit for each statistic recorded.
83
+
The `summaryReported` event is raised every 60 seconds and contains one (1) unique unit for each statistic recorded.
84
84
85
85
## Best practices
86
86
@@ -232,6 +232,7 @@ In earlier versions, `rttInMs` existed as `pairRttInMs` in the stats for audio,
232
232
## What are changed in SDK version 1.20.1 (GA)
233
233
234
234
We now support MediaStats feature API in 1.20.1 (GA).
235
+
235
236
Compared to the previous beta versions, we also made some minor changes to the API interface in this GA version.
236
237
237
238
In the previous beta versions, `pairRttInMs`, `availableBitrate` were included in audio, video, and screenShare statistics. Now these metrics are separated into transport metrics.
@@ -240,4 +241,4 @@ We introduced `packets` and `packetsLost` metric fields in audio, video, screenS
240
241
241
242
The `frameRateOutput` in video and screenShare statistics is removed. You can use `frameRateDecoded` instead.
242
243
243
-
The metric field `jitterBufferInMs`has been renamed to `jitterBufferDelayInMs` to provide a clearer description, because this metric indicates the duration of a packet stay in the jitter buffer.
244
+
The metric field `jitterBufferInMs`is renamed to `jitterBufferDelayInMs` to provide a clearer description, because this metric indicates the duration of a packet stay in the jitter buffer.
The Pre-Call API enables developers to programmatically validate a client’s readiness to join an Azure Communication Services Call. You can only access Pre-Call APIs through the Calling SDK. They provide multiple diagnostics including device, connection, and call quality. Pre-Call APIs are available only for Web (JavaScript). We'll be enabling these capabilities across platforms in the future. Provide us with [feedback](../../support.md)on which platforms you want to see Pre-Call APIs enabled.
18
+
The pre-call API feature enables developers to programmatically validate a client’s readiness to join an Azure Communication Services call. You can only access pre-call features using the Calling SDK. The pre-call diagnostic feature provides multiple diagnostics including device, connection, and call quality. The pre-call diagnotic feature is available only for Web (JavaScript). We plan to enable these capabilities across platforms in the future. Provide us with [feedback](../../support.md)about which platforms you want to see pre-call diagnostics enabled.
19
19
20
20
## Prerequisites
21
21
@@ -30,12 +30,12 @@ The Pre-Call API enables developers to programmatically validate a client’s re
30
30
31
31
For more information, see [Use Azure CLI to Create and Manage Access Tokens](../../quickstarts/identity/access-tokens.md?pivots=platform-azcli).
32
32
33
-
## Accessing Pre-Call APIs
33
+
## Accessing pre-call diagnostics
34
34
35
35
>[!IMPORTANT]
36
-
>Pre-call diagnostics are available starting on the version [1.9.1-beta.1](https://www.npmjs.com/package/@azure/communication-calling/v/1.9.1-beta.1) of the Calling SDK. Make sure to use that version when following these instructions.
36
+
>Pre-call diagnostics are available starting with version [1.9.1-beta.1](https://www.npmjs.com/package/@azure/communication-calling/v/1.9.1-beta.1) of the Calling SDK. Make sure to use that version or higher when following these instructions.
37
37
38
-
To Access the Pre-Call API, you need to initialize a `callClient`, and provision an Azure Communication Services access token. There you can access the `PreCallDiagnostics` feature and the `startTest` method.
38
+
To Access pre-call diagnostics, you need to initialize a `callClient`, and provision an Azure Communication Services access token. There you can access the `PreCallDiagnostics` feature and the `startTest` method.
@@ -51,7 +51,7 @@ Once it finishes running, developers can access the result object.
51
51
52
52
## Diagnostic results
53
53
54
-
The Pre-Call API returns a full diagnostic of the device including details like device permissions, availability and compatibility, call quality stats and in-call diagnostics. The results are returned as a `PreCallDiagnosticsResult` object.
54
+
Pre-call diagnostics returns a full diagnostic of the device including details like device permissions, availability and compatibility, call quality statistics, and in-call diagnostics. The results are returned as a `PreCallDiagnosticsResult` object.
55
55
56
56
```javascript
57
57
@@ -66,11 +66,11 @@ export declare type PreCallDiagnosticsResult = {
66
66
67
67
```
68
68
69
-
Individual result objects can be accessed as such using the `preCallDiagnosticsResult`constant. Results for individual tests be returned as they're completed with many of the test results being available immediately. If you use the `inCallDiagnostics` test, the results might take up to 1 minute as the test validates quality of the video and audio.
69
+
You can access individual result objects using the `preCallDiagnosticsResult`type. Results for individual tests are returned as they're completed with many of the test results being available immediately. If you use the `inCallDiagnostics` test, the results might take up to 1 minute as the test validates the quality of the video and audio.
70
70
71
71
### Browser support
72
72
73
-
Browser compatibility check. Checks for `Browser` and `OS` compatibility and provides a `Supported` or `NotSupported` value back.
73
+
Browser compatibility check. Checks for `Browser` and `OS` compatibility and returns a `Supported` or `NotSupported` value.
In the case that the test fails and the browser being used by the user is `NotSupported`, the easiest way to fix that is by asking the user to switch to a supported browser. Refer to the supported browsers in our [documentation](./calling-sdk-features.md#javascript-calling-sdk-support-by-os-and-browser).
85
+
If the test fails and the browser being used by the user is `NotSupported`, the easiest way to fix that is by asking the user to switch to a supported browser. Refer to the supported browsers in [Calling SDK overview > JavaScript Calling SDK support by OS and browser](./calling-sdk-features.md#javascript-calling-sdk-support-by-os-and-browser).
86
86
87
87
>[!NOTE]
88
88
>Known issue: `browser support` test returning `Unknown` in cases where it should be returning a correct value.
89
89
90
90
### Device access
91
91
92
-
Permission check. Checks whether video and audio devices are available from a permissions perspective. Provides `boolean` value for `audio` and `video` devices.
92
+
The permission check determines whether video and audio devices are available from a permissions perspective. Provides `boolean` value for `audio` and `video` devices.
93
93
94
94
```javascript
95
95
@@ -101,11 +101,11 @@ Permission check. Checks whether video and audio devices are available from a pe
101
101
102
102
```
103
103
104
-
In the case that the test fails and the permissions are false for audio and video, the user shouldn't continue into joining a call. Rather you need to prompt the user to enable the permissions. To do it, the best way is provided the specific instruction on how to access permission access based on the OS, version, and browser they are on. For more information on permissions, check out our [recommendations](https://techcommunity.microsoft.com/t5/azure-communication-services/checklist-for-advanced-calling-experiences-in-mobile-web/ba-p/3266312).
104
+
If the test fails and the permissions are false for audio and video, the user shouldn't continue into joining a call. Rather, prompt the user to enable the permissions. The best way to do this is by providing the specific instruction on how to access permissions based on the OS, version, and browser they're using. For more information about permissions, see the [Checklist for advanced calling experiences in web browsers](https://techcommunity.microsoft.com/t5/azure-communication-services/checklist-for-advanced-calling-experiences-in-mobile-web/ba-p/3266312).
105
105
106
106
### Device enumeration
107
107
108
-
Device availability. Checks whether microphone, camera, and speaker devices are detected in the system and ready to use. Provides an `Available` or `NotAvailable` value back.
108
+
Device availability. Checks whether microphone, camera, and speaker devices are detected in the system and ready to use. Returns an `Available` or `NotAvailable` value.
109
109
110
110
```javascript
111
111
@@ -118,13 +118,15 @@ Device availability. Checks whether microphone, camera, and speaker devices are
118
118
119
119
```
120
120
121
-
In the case that devices aren't available, the user shouldn't continue into joining a call. Ratherthe user should be prompted to check device connections to ensure any headsets, cameras or speakers are properly connected. For more information on device management, check out our [documentation](../../how-tos/calling-sdk/manage-video.md?pivots=platform-web#device-management)
121
+
If devices aren't available, the user shouldn't continue into joining a call. Rather, prompt the user to check device connections to ensure any headsets, cameras, or speakers are properly connected. For more information about device management, see [Manage video during calls](../../how-tos/calling-sdk/manage-video.md?pivots=platform-web#device-management).
122
122
123
123
### InCall diagnostics
124
124
125
-
Performs a quick call to check in-call metrics for audio and video and provides results back. Includes connectivity (`connected`, boolean), bandwidth quality (`bandWidth`, `'Bad' | 'Average' | 'Good'`) and call diagnostics for audio and video (`diagnostics`). Diagnostic are provided`jitter`, `packetLoss`, and `rtt` and results are generated using a simple quality grade (`'Bad' | 'Average' | 'Good'`).
125
+
Performs a quick call to check in-call metrics for audio and video and provides results back. Includes connectivity (`connected`, boolean), bandwidth quality (`bandWidth`, `'Bad' | 'Average' | 'Good'`) and call diagnostics for audio and video (`diagnostics`). Provided diagnostic categories include`jitter`, `packetLoss`, and `rtt` and results are generated using a simple quality grade (`'Bad' | 'Average' | 'Good'`).
126
126
127
-
InCall diagnostics uses [media quality stats](./media-quality-sdk.md) to calculate quality scores and diagnose issues. During the pre-call diagnostic, the full set of media quality stats are available for consumption. These stats include raw values across video and audio metrics that can be used programatically. The InCall diagnostic provides a convenience layer on top of media quality stats to consume the results without the need to process all the raw data. See section on media stats for instructions to access.
127
+
InCall diagnostics uses [Media quality statistics](./media-quality-sdk.md) to calculate quality scores and diagnose issues. During the pre-call diagnostic, the full set of media quality statistics are available for consumption. These statistics include raw values across video and audio metrics that you can use programatically.
128
+
129
+
The InCall diagnostic provides a convenience layer on top of media quality statistics to consume the results without the need to process all the raw data. For more information including instructions to access, see [Media quality statistics for an ongoing call](./media-quality-sdk.md#media-quality-statistics-for-an-ongoing-call).
At this step, there are multiple failure points to watch out for. The values provided by the API are based on the threshold values required by the service. Those raw thresholds can be found in our [media quality stats documentation](./media-quality-sdk.md#best-practices).
143
-
144
-
- If connection fails, the user should be prompted to recheck their network connectivity. Connection failures can also be attributed to network conditions like DNS, proxies, or firewalls. For more information on recommended network setting, check out our [documentation](network-requirements.md).
145
-
- If bandwidth is `Bad`, the user should be prompted to try out a different network or verify the bandwidth availability on their current one. Ensure no other high bandwidth activities might be taking place.
146
-
147
-
### Media stats
148
-
149
-
For granular stats on quality metrics like jitter, packet loss, rtt, and so on. We provide `callMediaStatistics` as part of the `preCallDiagnosticsResult` feature. For the full list and descriptions of available metrics, see [Media quality statistics](./media-quality-sdk.md). You can subscribe to the call media stats to get the full collection. This stat is the raw metrics used to calculate InCall diagnostic results which can be consumed granularly for further analysis.
150
-
151
-
Media quality statistics is an extended feature of the core `Call` API. You first need to obtain the `mediaStatsFeature` API object:
To receive the media statistics data, you can subscribe to the `sampleReported` event or the `summaryReported` event.
158
-
159
-
The `sampleReported` event triggers every second. It's suitable as a data source for UI display or your own data pipeline.
160
-
161
-
The `summaryReported` event contains the aggregated values of the data over intervals, which is useful when you just need a summary.
162
-
163
-
If you want control over the interval of the `summaryReported` event, you need to define `mediaStatsCollectorOptions` of type `MediaStatsCollectorOptions`. Otherwise, the SDK uses default values.
If you don't need to use the media statistics collector, you can call `dispose` method of `mediaStatsCollector`.
183
-
184
-
```js
185
-
mediaStatsCollector.dispose();
186
-
```
144
+
At this step, there are multiple possible failure points. The values provided by the API are based on the threshold values required by the service. The raw thresholds can be found in [Media quality statistics](./media-quality-sdk.md#best-practices).
187
145
188
-
You don't need to call `dispose` method of `mediaStatsCollector` every time when the call ends, because the collectors are reclaimed internally when the call ends.
146
+
- If a connection fails, prompt users to recheck their network connectivity. Connection failures can also be attributed to network conditions like DNS, proxies, or firewalls. For more information on recommended network setting, see [Network recommendations](network-requirements.md).
147
+
- If bandwidth is `Bad`, prompt users to try a different network or verify the bandwidth availability on their current network. Ensure no other high bandwidth activities are taking place.
0 commit comments