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
Replaced "startCollector" code in pre-call-diagnostics with "createCollector" code from media-quality-sdk include file media-stats-web. Also ran Acrolinx and edited.
To receive the media statistics data, you can subscribe `sampleReported` event or `summaryReported` event.
26
+
To receive the media statistics data, you can subscribe to the `sampleReported` event or the`summaryReported` event.
27
27
28
-
`sampleReported` event triggers every second. It's suitable as a data source for UI display or your own data pipeline.
28
+
The `sampleReported` event triggers every second. It's suitable as a data source for UI display or your own data pipeline.
29
29
30
-
`summaryReported` event contains the aggregated values of the data over intervals, which is useful when you just need a summary.
30
+
The `summaryReported` event contains the aggregated values of the data over intervals, which is useful when you just need a summary.
31
31
32
-
If you want control over the interval of the `summaryReported` event, you need to define `mediaStatsCollectorOptions` of type `MediaStatsCollectorOptions`.
33
-
Otherwise, the SDK uses default values.
32
+
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.
In case you don't need to use the media statistics collector, you can call `dispose` method of `mediaStatsCollector`.
52
+
If you don't need to use the media statistics collector, you can call `dispose` method of `mediaStatsCollector`.
54
53
55
54
```js
56
55
mediaStatsCollector.dispose();
57
56
```
58
-
It's not necessary to call `dispose` method of `mediaStatsCollector` every time when the call ends, as the collectorsare reclaimed internally when the call ends.
57
+
58
+
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.
59
59
60
60
### MediaStatsCollectorOptions
61
61
@@ -86,9 +86,9 @@ The `summaryReported` event is raised every 60 seconds and contains 1 unique uni
86
86
87
87
If you want to collect the data for offline inspection, we recommend that you collect the data and send it to your pipeline ingestion after your call ends. If you transmit the data during a call, it could use internet bandwidth needed to continue an Azure Communication Services call (especially when available bandwidth is low).
88
88
89
-
In either `sampleReported` event or `summaryReported` event, the media statistics data are not just a simple key-value mapping.
89
+
In either `sampleReported` event or `summaryReported` event, the media statistics data aren't just a simple key-value mapping.
90
90
91
-
Here is the type declaration of the event data reported by `sampleReported` event.
91
+
Here's the type declaration of the event data reported by `sampleReported` event.
The event data provide the statistics data for each media stream in the call, including both send and receive directions.
112
112
113
-
It's recommended that you print the event using the `console.log` to observe its layout and value changes, so you can find a proper way to display or process the data according to your usage scenario.
113
+
We recommended that you print the event using the `console.log` to observe its layout and value changes, so you can find a proper way to display or process the data according to your usage scenario.
114
114
115
115
### Audio send metrics
116
116
@@ -130,7 +130,7 @@ It's recommended that you print the event using the `console.log` to observe its
130
130
131
131
### Audio receive metrics
132
132
133
-
In the SDK versions ealier than 1.20.1, `jitterBufferDelayInMs` existed as `jitterBufferInMs`.
133
+
In the SDK versions earlier than 1.20.1, `jitterBufferDelayInMs` existed as `jitterBufferInMs`.
134
134
135
135
| Metric name | Description | Comments |
136
136
| ----------- | ----------- | -------- |
@@ -149,7 +149,7 @@ In the SDK versions ealier than 1.20.1, `jitterBufferDelayInMs` existed as `jitt
149
149
150
150
### Video send metrics
151
151
152
-
Starting from SDK version 1.20.1, the video send metrics included the `altLayouts` metric field, which allows for a better representation of simulcast stream statistics.
152
+
Starting from SDK version 1.20.1, the video send metrics included the `altLayouts` metric field, which enable a better representation of simulcast stream statistics.
153
153
154
154
| Metric name | Description | Comments |
155
155
| ----------- | ----------- | -------- |
@@ -234,11 +234,10 @@ In earlier versions, `rttInMs` existed as `pairRttInMs` in the stats for audio,
234
234
We now support MediaStats feature API in 1.20.1 (GA).
235
235
Compared to the previous beta versions, we also made some minor changes to the API interface in this GA version.
236
236
237
-
In the previous beta versions, `pairRttInMs`, `availableBitrate` were included in audio, video, and screenShare statistics.
238
-
Now, these metrics have been separated into transport metrics.
237
+
In the previous beta versions, `pairRttInMs`, `availableBitrate` were included in audio, video, and screenShare statistics. Now these metrics are separated into transport metrics.
239
238
240
-
We introduced `packets`,`packetsLost` metric fields in audio, video, screenShare statistics. These metrics are useful for calculating the total number of packets sent or recieved between two different time points.
239
+
We introduced `packets` and`packetsLost` metric fields in audio, video, screenShare statistics. These metrics are useful for calculating the total number of packets sent or recieved between two different time points.
241
240
242
241
The `frameRateOutput` in video and screenShare statistics is removed. You can use `frameRateDecoded` instead.
243
242
244
-
The metric field `jitterBufferInMs` has been renamed to `jitterBufferDelayInMs` to provide a clearer description, as this metric indicates the duration of a packet stay in the jitter buffer.
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.
To help you understand media quality in VoIP and video calls that use Azure Communication Services, there's a feature called *media quality statistics*. Use it to examine the low-level audio, video, and screen-sharing quality metrics for incoming and outgoing call metrics.
19
+
To help you better understand media quality in VoIP and video calls that use Azure Communication Services, there's a feature called *media quality statistics*. Use it to examine the low-level audio, video, and screen-sharing quality metrics for incoming and outgoing call metrics.
20
20
21
21
::: zone pivot="platform-web"
22
22
[!INCLUDE [Media Stats for Web](./includes/media-stats/media-stats-web.md)]
The Pre-Call API enables developers to programmatically validate a client’s readiness to join an Azure Communication Services Call. The Pre-Call APIs can be accessed 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 on what platforms you would like to see Pre-Call APIs on.
18
+
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.
19
19
20
20
## Prerequisites
21
21
22
22
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23
23
-[Node.js](https://nodejs.org/) active Long Term Support(LTS) versions are recommended.
24
24
- An active Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
25
-
- A User Access Token to instantiate the call client. Learn how to [create and manage user access tokens](../../quickstarts/identity/access-tokens.md). You can also use the Azure CLI and run the next command with your connection string to create a user and an access token. (Need to grab connection string from the resource through Azure portal.)
25
+
- A User Access Token to instantiate the call client. Learn how to [create and manage user access tokens](../../quickstarts/identity/access-tokens.md). You can also use the Azure CLI and run the next command with your connection string to create a user and an access token. Remember to copy the connection string from the resource through Azure portal.
26
26
27
27
```azurecli-interactive
28
28
az communication identity token issue --scope voip --connection-string "yourConnectionString"
29
29
```
30
30
31
-
For details, see [Use Azure CLI to Create and Manage Access Tokens](../../quickstarts/identity/access-tokens.md?pivots=platform-azcli).
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
33
## Accessing Pre-Call APIs
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 trying the next instructions.
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.
37
37
38
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.
39
39
@@ -69,6 +69,7 @@ export declare type PreCallDiagnosticsResult = {
69
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.
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
74
74
75
```javascript
@@ -87,6 +88,7 @@ In the case that the test fails and the browser being used by the user is `NotSu
87
88
>Known issue: `browser support` test returning `Unknown` in cases where it should be returning a correct value.
88
89
89
90
### Device access
91
+
90
92
Permission check. Checks whether video and audio devices are available from a permissions perspective. Provides `boolean` value for `audio` and `video` devices.
91
93
92
94
```javascript
@@ -99,10 +101,11 @@ Permission check. Checks whether video and audio devices are available from a pe
99
101
100
102
```
101
103
102
-
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
+
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).
103
105
104
106
### Device enumeration
105
-
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.
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.
106
109
107
110
```javascript
108
111
@@ -118,7 +121,8 @@ Device availability. Checks whether microphone, camera and speaker devices are d
118
121
In the case that devices aren't available, the user shouldn't continue into joining a call. Rather the 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)
119
122
120
123
### InCall diagnostics
121
-
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'`).
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'`).
122
126
123
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.
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).
139
143
140
-
- 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).
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).
141
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.
142
146
143
147
### Media stats
144
-
For granular stats on quality metrics like jitter, packet loss, rtt, etc. `callMediaStatistics` are provided as part of the `preCallDiagnosticsResult` feature. See the [full list and description of the available metrics](./media-quality-sdk.md) in the linked article. You can subscribe to the call media stats to get full collection of them. This stat is the raw metrics that are used to calculate InCall diagnostic results and which can be consumed granularly for further analysis.
145
148
146
-
```javascript
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:
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
+
```
187
+
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.
189
+
157
190
## Pricing
158
191
159
-
When the Pre-Call diagnostic test runs, behind the scenes it uses calling minutes to run the diagnostic. The test lasts for roughly 30 seconds, using up 30 seconds of calling which is charged at the standard rate of $0.004 per participant per minute. For the case of Pre-Call diagnostic, the charge will be for 1 participant x 30 seconds = $0.002.
192
+
When the pre-call diagnostic test runs behind the scenes, it uses calling minutes to run the diagnostic. The test lasts for roughly 30 seconds, using up 30 seconds of calling time which is charged at the standard rate of $0.004 per participant per minute. For the case of pre-call diagnostics, the charge is for 1 participant x 30 seconds = $0.002.
0 commit comments