Update:
I'd been discussing on this on internally, our product engineering team have made an update - where they moved isSupported method on the video effects feature API - VideoEffectsFeature interface | Microsoft Learn - deprecating the old one.
Azure doc update:
QuickStart: Add video effects to your video calls | Background replacement with an image
const backgroundImage = 'https://linkToImageFile';
// Create the effect instance
const backgroundReplacementEffect = new BackgroundReplacementEffect({
backgroundImageUrl: backgroundImage
});
// Recommended: Check support by using the isSupported method on the feature API
const backgroundReplacementSupported = await videoEffectsFeatureApi.isSupported(backgroundReplacementEffect);
if (backgroundReplacementSupported) {
// Use the video effects feature api as before to start/stop effects
await videoEffectsFeatureApi.startEffects(backgroundReplacementEffect);
}
// The video effects feature API
const videoEffectsFeatureApi = localVideoStream.feature(Features.VideoEffects);
// The bg replacement effect object
const backgroundReplacementEffect = new EffectsSDK.BackgroundReplacementEffect({ backgroundImage: 'imagePath' });
// check support:
const backgroundReplacementSupported = await videoEffectsFeatureApi.isSupported(backgroundReplacementEffect);
Much appreciate your feedback.
If the answer helped (pointed you in the right direction) > please click Accept Answer and Upvote