Agora RTC Objective-C API Reference  Refactor
Public Types | Data Fields
VirtualBackgroundSource Struct Reference

Public Types

enum  BACKGROUND_SOURCE_TYPE { BACKGROUND_COLOR = 1, BACKGROUND_IMG = 2, BACKGROUND_BLUR = 3 }
 
enum  BACKGROUND_BLUR_DEGREE { BLUR_DEGREE_LOW = 1, BLUR_DEGREE_MEDIUM = 2, BLUR_DEGREE_HIGH = 3 }
 

Data Fields

BACKGROUND_SOURCE_TYPE background_source_type
 
unsigned int color
 
const char * source
 
BACKGROUND_BLUR_DEGREE blur_degree
 

Detailed Description

The custom background image.

Member Enumeration Documentation

◆ BACKGROUND_SOURCE_TYPE

The type of the custom background image.

Enumerator
BACKGROUND_COLOR 

1: (Default) The background image is a solid color.

BACKGROUND_IMG 

The background image is a file in PNG or JPG format.

BACKGROUND_BLUR 

The background image is the blurred background.

◆ BACKGROUND_BLUR_DEGREE

The degree of blurring applied to the custom background image..

Enumerator
BLUR_DEGREE_LOW 

1: The degree of blurring applied to the custom background image is low. The user can almost see the background clearly.

BLUR_DEGREE_MEDIUM 

2: The degree of blurring applied to the custom background image is medium. It is difficult for the user to recognize details in the background.

BLUR_DEGREE_HIGH 

3: (Default) The degree of blurring applied to the custom background image is high. The user can barely see any distinguishing features in the background.

Constructor & Destructor Documentation

◆ VirtualBackgroundSource()

Field Documentation

◆ background_source_type

BACKGROUND_SOURCE_TYPE background_source_type

The type of the custom background image. See BACKGROUND_SOURCE_TYPE.

◆ color

unsigned int color

The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000,0xFFFFFF]. If the value is invalid, the SDK replaces the original background image with a white background image.

Note
This parameter takes effect only when the type of the custom background image is BACKGROUND_COLOR.

◆ source

const char* source

The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image.

Note
This parameter takes effect only when the type of the custom background image is BACKGROUND_IMG.

◆ blur_degree

The degree of blurring applied to the custom background image. See BACKGROUND_BLUR_DEGREE.

Note
This parameter takes effect only when the type of the custom background image is BACKGROUND_BLUR.