We are programmatically setting the virtual background for our users. Using the example code in sdk_demo_v2, we added the image using AddBGImage(file_path) and then retrieved the image from GetBGImageList() ->GetItem(index). We then utilize UseBGImage(pImageInfo) to set the VBG and receive SDKERROR_SUCCESS. The virtual background cannot be seen in the users video element.
The following code shows how the VBG is being set:
Device (please complete the following information):
- Device Spec: PC
- OS: Windows 10
I looped through the list after setting my image to verify which image is selected for the background. isSelected() returns true on index 0, which I understand to be the default for “no background image.” I ensured that my image was at index 1, but this did not change the selected image from index 0.