setBackground method

Future<void> setBackground(
  1. VirtualBackground background
)

Set the current virtual background.

This preloads any necessary resources for the background.

Implementation

Future<void> setBackground(VirtualBackground background) async {
  _currentBackground = background;

  // Preload image if needed
  if (background.type == BackgroundType.image) {
    await _preloadBackgroundImage(background);
  }
}