Skip to content

Commit 0ec8e94

Browse files
authored
Merge pull request #194766 from ddematheu2/dademath-pre-call
Update pre-call-diagnostics.md
2 parents fd63bb9 + 591d53c commit 0ec8e94

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/communication-services/concepts/voice-video-calling/pre-call-diagnostics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ The Pre-Call API enables developers to programmatically validate a client’s re
2020

2121
## Accessing Pre-Call APIs
2222

23-
To Access the Pre-Call API, you will need to initialize a `callClient` and provision an Azure Communication Services access token. Then you can access the `NetworkTest` feature and run it.
23+
To Access the Pre-Call API, you will need to initialize a `callClient` and provision an Azure Communication Services access token. There you can access the `Diganostics` feature and the `preCallTest` method.
2424

2525
```javascript
2626
import { CallClient, Features} from "@azure/communication-calling";
2727
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
2828

2929
const tokenCredential = new AzureCommunicationTokenCredential();
30-
const networkTest = await callClient.feature(Features.NetworkTest).beginTest(tokenCredential);
30+
const preCallTest = await callClient.feature(Features.Diganostics).preCallTest(tokenCredential);
3131

3232
```
3333

@@ -49,14 +49,14 @@ export declare type CallDiagnosticsResult = {
4949

5050
```
5151

52-
Individual result objects can be accessed as such using the `networkTest` constant above.
52+
Individual result objects can be accessed as such using the `preCallTest` constant above.
5353

5454
### Browser support
5555
Browser compatibility check. Checks for `Browser` and `OS` compatibility and provides a `Supported` or `NotSupported` value back.
5656

5757
```javascript
5858

59-
const browserSupport = await networkTest.browserSupport;
59+
const browserSupport = await preCallTest.browserSupport;
6060
if(browserSupport) {
6161
console.log(browserSupport.browser)
6262
console.log(browserSupport.os)
@@ -71,7 +71,7 @@ Permission check. Checks whether video and audio devices are available from a pe
7171

7272
```javascript
7373

74-
const deviceAccess = await networkTest.deviceAccess;
74+
const deviceAccess = await preCallTest.deviceAccess;
7575
if(deviceAccess) {
7676
console.log(deviceAccess.audio)
7777
console.log(deviceAccess.video)
@@ -86,7 +86,7 @@ Device availability. Checks whether microphone, camera and speaker devices are d
8686

8787
```javascript
8888

89-
const deviceEnumeration = await networkTest.deviceEnumeration;
89+
const deviceEnumeration = await preCallTest.deviceEnumeration;
9090
if(deviceEnumeration) {
9191
console.log(deviceEnumeration.microphone)
9292
console.log(deviceEnumeration.camera)
@@ -102,7 +102,7 @@ Performs a quick call to check in-call metrics for audio and video and provides
102102

103103
```javascript
104104

105-
const inCallDiagnostics = await networkTest.inCallDiagnostics;
105+
const inCallDiagnostics = await preCallTest.inCallDiagnostics;
106106
if(inCallDiagnostics) {
107107
console.log(inCallDiagnostics.connected)
108108
console.log(inCallDiagnostics.bandWidth)
@@ -118,7 +118,7 @@ At this step, there are multiple failure points to watch out for:
118118
- 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.
119119

120120
### Media stats
121-
For granular stats on quality metrics like jitter, packet loss, rtt, etc. `callMediaStatistics` are provided as part of the `NetworkTest` feature. You can subscribe to the call media stats to get full collection of them.
121+
For granular stats on quality metrics like jitter, packet loss, rtt, etc. `callMediaStatistics` are provided as part of the `PreCallTest` feature. You can subscribe to the call media stats to get full collection of them.
122122

123123
## Pricing
124124

0 commit comments

Comments
 (0)