# Virtual backgrounds

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The Video SDK for Windows lets you replace a user's camera background with a virtual background. On Windows, the virtual background methods live directly on `IZoomVideoSDKVideoHelper`. There is no separate virtual background helper. Each background image is represented by an `IVirtualBackgroundItem`.

## Typical flow

To apply a virtual background:

1. Add an image with `addVirtualBackgroundItem`, which returns an `IVirtualBackgroundItem` for the image you added.
2. Apply it with `setVirtualBackgroundItem`.
3. Remove it later with `removeVirtualBackgroundItem`, or read the active item with `getSelectedVirtualBackgroundItem`.

Use `getVirtualBackgroundItemList` to retrieve the items you have added.

## Example

```cpp
IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();

// Add a background image and apply it.
IVirtualBackgroundItem* pItem = NULL;
if (pVideoHelper->addVirtualBackgroundItem(L"C:\\path\\to\\background.jpg", &pItem) == ZoomVideoSDKErrors_Success)
{
    pVideoHelper->setVirtualBackgroundItem(pItem);
}

// Remove the background later.
pVideoHelper->removeVirtualBackgroundItem(pItem);
```

Read an item's image path and name with `getImageFilePath` and `getImageName`.
