Agora Java API Reference for Android

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
io.agora.rtc2.video.VirtualBackgroundSource Class Reference

## Public Member Functions
| VirtualBackgroundSource (int backgroundSourceType, int color, String source, int blurDegree)

## Public Attributes
int | backgroundSourceType
int | color
String | source = null
int | blurDegree

## Static Public Attributes
static final int | BACKGROUND_NONE = 0
static final int | BACKGROUND_COLOR = 1
static final int | BACKGROUND_IMG = 2
static final int | BACKGROUND_BLUR = 3
static final int | BACKGROUND_VIDEO = 4
static final int | BLUR_DEGREE_LOW = 1
static final int | BLUR_DEGREE_MEDIUM = 2
static final int | BLUR_DEGREE_HIGH = 3

## Detailed Description

Background substitude meta data.

## Member Data Documentation

## ◆ BACKGROUND_NONE

final int io.agora.rtc2.video.VirtualBackgroundSource.BACKGROUND_NONE = 0
| static

0: Enable segementation with the captured video frame without replacing the background.

## ◆ BACKGROUND_COLOR

final int io.agora.rtc2.video.VirtualBackgroundSource.BACKGROUND_COLOR = 1
| static

1: The background is a solid color(eg: Oxffffff).

## ◆ BACKGROUND_IMG

final int io.agora.rtc2.video.VirtualBackgroundSource.BACKGROUND_IMG = 2
| static

2: Image source in PNG or JPG format.

## ◆ BACKGROUND_BLUR

final int io.agora.rtc2.video.VirtualBackgroundSource.BACKGROUND_BLUR = 3
| static

3: Background blur. blur your background, not including your body.

## ◆ BACKGROUND_VIDEO

final int io.agora.rtc2.video.VirtualBackgroundSource.BACKGROUND_VIDEO = 4
| static

4: Video source in MP4, AVI, MKV, FLV format.

## ◆ BLUR_DEGREE_LOW

final int io.agora.rtc2.video.VirtualBackgroundSource.BLUR_DEGREE_LOW = 1
| static

blur degree low, have few blur effect

## ◆ BLUR_DEGREE_MEDIUM

final int io.agora.rtc2.video.VirtualBackgroundSource.BLUR_DEGREE_MEDIUM = 2
| static

blur degree medium, blur more than level 1

## ◆ BLUR_DEGREE_HIGH

final int io.agora.rtc2.video.VirtualBackgroundSource.BLUR_DEGREE_HIGH = 3
| static

blur degree high, blur default, hard to find background

## ◆ backgroundSourceType

int io.agora.rtc2.video.VirtualBackgroundSource.backgroundSourceType

The source type used to substitude capture image background. {backgroundSourceType}: BACKGROUND_NONE(0): background is none. BACKGROUND_COLOR(1): (default) background is color. {BACKGROUND_IMG(2)}: background is image.

## ◆ color

int io.agora.rtc2.video.VirtualBackgroundSource.color

Background color value, for example: "#aabbcc"

## ◆ source

String io.agora.rtc2.video.VirtualBackgroundSource.source = null

Background image file path

## ◆ blurDegree

int io.agora.rtc2.video.VirtualBackgroundSource.blurDegree

Background blur degree