Azure / Communication

Azure Communication Services - SDKs and Release Notes
MIT License
317 stars 97 forks source link

BackgroundBlurEffect.isSupported() returns true on unsupported browsers. #535

Closed picorel closed 9 months ago

picorel commented 11 months ago

Describe the bug; what happened?

We want to check if blur background is supported and only show the video effect controls when it is supported.

We followed the example from this documentation and added:

const backgroundBlurEffect = new BackgroundBlurEffect(); 
const backgroundBlurSupported = await backgroundBlurEffect.isSupported(); 

isSupported is returning true in some unsupported browsers. We noticed it in Firefox (Desktop on MacOS) and some mobile devices (Chrome on Android and sometimes on iOS).

Is it expected or a known issue?

If we try to enable the video effect in these browsers, it doesn't work. We are using the CallComposite, so if we try to blur the background callAdapter.startVideoBackgroundEffect({...}), it shows the message "Unable to apply video effect.".

In what environment did you see the issue?

We are currently using

We also tried with "@azure/communication-calling-effects": “1.0.1” and "@azure/communication-calling": "1.16.3" and isSupported also returns true.

JamesBurnside commented 11 months ago

Hi @picorel , thanks for bringing this to our attention. As the issue is with the underlying SDK function (and not the UI library side) I am migrating this issue to https://github.com/Azure/Communication

gaobob-msft commented 11 months ago

@akania

pkestikar commented 11 months ago

Hi @picorel, thanks for reporting the issue. We'll aim to fix this in our upcoming beta release of the SDK.

pkestikar commented 9 months ago

Hi @picorel , so background blur should work in Firefox Desktop MacOS so isSupported returning true there is valid. Though, isSupported returning true on mobile devices is a bug - we don't support background blur/replacement on mobile devices yet. This should be fixed in our new beta - https://www.npmjs.com/package/@azure/communication-calling/v/1.20.1-beta.2

The isSupported on the effect instance (BackgroundBlurEffect for eg) is now deprecated. There is a new isSupported method on the VideoEffectsFeature API now, that will return a more accurate check. Please try it out and let us know how it fares.