I have a trouble to apply virtual background

Hello,dear
I have a trouble to apply my virtual background,I tried to code as examples, it return success,but actually it doesn’t work.but demo runs rightly.is there anything I need to do?Please give me a favor。

Hi shenyantaoit,

Thanks for using Zoom SDK. May I ask which SDK platform are you referring to(And which version?) and which interface is not working?

Thanks!

Windows Sdk.


the sdk information is above,and this method IVirtualBGSettingContext::UseBGImage doesn’t work on my pc.
I am a greenhand in zoomsdk,please give me a favor.

hi,expert.
Could you give me a favor?I want to change virtual background frequently,but it is unfriendly,it blocks my work.
thank you.

Hi shenyantaoit,

Thanks for the reply. Did you add the image using AddBGImage and get the image list using GetBGImageList before calling the UseBGImage? The UseBGImage only accepts the images that exist in the GetBGImageList. The corresponding interfaces are in https://github.com/zoom/zoom-sdk-windows/blob/6295059767afa50e42ca8a59ce797a3001684c87/demo/sdk_demo_v2/SETTINGS_virtualBG_workflow.cpp

You may refer to our demo app for the implementation: https://github.com/zoom/zoom-sdk-windows/blob/6295059767afa50e42ca8a59ce797a3001684c87/demo/sdk_demo_v2/settings_ui.cpp#L1655

If the above steps do not help and the issue persists, are you getting any error message or could you provide the steps of how to reproduce this issue with our demo app?

Thanks!

Hi,Dear Chen,
I did as demo_v2,The following code segments come from my demo,


and it runs correctly,but it doesn’t work.there is no error message,so I
don’t know what to do.Is there anything I did wrong?I would
appreciate it very much if you would help me with it.
Thanks!

Hi,Dear Chen,
Please look at my last message,
and my debug information is as below:


Thank you for your support.

Hi shenyantaoit,

Thanks for the reply and the code snippet, the code showing in the screenshot looks good to me, but using virtual background might more configurations, our demo app has the exact implementations of how to use the virtual background in SDK, you may refer to the following: https://github.com/zoom/zoom-sdk-windows/blob/master/demo/sdk_demo_v2/settings_ui.cpp#L1481.

Hope this helps. Thanks!

Hi shenyantaoit,

A few more tips that might be helpful:

  1. Please call the following 3 interfaces first to see if the current meeting supports virtual background, and see the current status of the virtual background feature:
    • virtual bool IsSupportVirtualBG();
    • IsSupportSmartVirtualBG() ;
    • IsUsingGreenScreenOn();
  2. Please add conditions to check whether the AddBGImage() is a success or not, and provide some time for the response before proceeding to the next action.
  3. If it is still not working, please try to delete the folder %AppData%/ZoomSDK and try again.

Hope this helps. Thanks!