Skip to content

Commit 3bacbdf

Browse files
authored
Update call-transcription-web.md
1 parent e4d53e0 commit 3bacbdf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/communication-services/how-tos/calling-sdk/includes/call-transcription/call-transcription-web.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ ms.author: tchladek
1616
`Transcription` is an extended feature of the class `Call`. You first need to obtain the transcription feature API object
1717

1818
```js
19-
const callTranscriptionApi = call.api(Features.Transcription);
19+
const callTranscriptionFeature = call.feature(Features.Transcription);
2020
```
2121

2222
You can check state of the transcription in the property `isTranscriptionActive`. If value is set to `true`, then transcription is active.
2323

2424
```js
25-
const isTranscriptionActive = callTranscriptionApi.isTranscriptionActive;
25+
const isTranscriptionActive = callTranscriptionFeature.isTranscriptionActive;
2626
```
2727

2828
You can subscribe to event, that is triggered when state of transcription changes:
2929

3030
```js
3131
const isTranscriptionActiveChangedHandler = () => {
32-
console.log(callTranscriptionApi.isTranscriptionActive);
32+
console.log(callTranscriptionFeature.isTranscriptionActive);
3333
};
34-
callRecordingApi.on('isTranscriptionActiveChanged', isTranscriptionActiveChangedHandler);
34+
callTranscriptionFeature.on('isTranscriptionActiveChanged', isTranscriptionActiveChangedHandler);
3535
```
3636

3737
You can unsubscribe from the event with the following code:
3838

3939
```js
40-
callRecordingApi.off('isTranscriptionActiveChanged', isTranscriptionActiveChangedHandler);
40+
callTranscriptionFeature.off('isTranscriptionActiveChanged', isTranscriptionActiveChangedHandler);
4141
```

0 commit comments

Comments
 (0)