Skip to content

Commit 7abbef1

Browse files
Merge pull request #226029 from sloanster/patch-10
Update video-effects.md
2 parents 49a7e4d + 5139920 commit 7abbef1

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

articles/communication-services/concepts/voice-video-calling/video-effects.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Use ‘npm install’ command to install the Azure Communication Calling Effects
5050
```console
5151
npm install @azure/communication-calling-effects --save
5252
```
53+
See [here](https://www.npmjs.com/package/@azure/communication-calling-effects) for more details on the calling commmunication effects npm package page.
5354

5455
## Supported video effects:
5556
Currently the video effects support the following ability:
@@ -70,12 +71,10 @@ To use video effects with the Azure Communication Calling client library, once y
7071
import * as AzureCommunicationCallingSDK from '@azure/communication-calling';
7172
import { BackgroundBlurEffect, BackgroundReplacementEffect } from '@azure/communication-calling-effects';
7273

73-
/** Assuming you have initialized the Azure Communication Calling client library and have created a LocalVideoStream
74-
(reference <link to main SDK npm>)
75-
*/
74+
// Ensure you have initialized the Azure Communication Calling client library and have created a LocalVideoStream
7675

7776
// Get the video effects feature api on the LocalVideoStream
78-
const videoEffectsFeatureApi = localVideoStream.features(AzureCommunicationCallingSDK.Features.VideoEffects);
77+
const videoEffectsFeatureApi = localVideoStream.feature(AzureCommunicationCallingSDK.Features.VideoEffects);
7978

8079
// Subscribe to useful events
8180
videoEffectsFeatureApi.on(‘effectsStarted’, () => {
@@ -100,9 +99,7 @@ const backgroundBlurSupported = await backgroundBlurEffect.isSupported();
10099

101100
if (backgroundBlurSupported) {
102101
// Use the video effects feature api we created to start/stop effects
103-
104102
await videoEffectsFeatureApi.startEffects(backgroundBlurEffect);
105-
106103
}
107104

108105

@@ -116,9 +113,7 @@ const backgroundImage = 'https://linkToImageFile';
116113

117114
// Create the effect instance
118115
const backgroundReplacementEffect = new BackgroundReplacementEffect({
119-
120116
backgroundImageUrl: backgroundImage
121-
122117
});
123118

124119
// Recommended: Check if background replacement is supported:
@@ -133,9 +128,7 @@ if (backgroundReplacementSupported) {
133128

134129
const newBackgroundImage = 'https://linkToNewImageFile';
135130
await backgroundReplacementEffect.configure({
136-
137131
backgroundImageUrl: newBackgroundImage
138-
139132
});
140133

141134
//You can switch the effects using the same method on the video effects feature api:

0 commit comments

Comments
 (0)