VirtualBackgroundSource

Custom background.

class VirtualBackgroundSource {
  const VirtualBackgroundSource(
      {this.backgroundSourceType, this.color, this.source, this.blurDegree});

  @JsonKey(name: 'background_source_type')
  final BackgroundSourceType? backgroundSourceType;
  @JsonKey(name: 'color')
  final int? color;
  @JsonKey(name: 'source')
  final String? source;
  @JsonKey(name: 'blur_degree')
  final BackgroundBlurDegree? blurDegree;
  factory VirtualBackgroundSource.fromJson(Map<String, dynamic> json) =>
      _$VirtualBackgroundSourceFromJson(json);
  Map<String, dynamic> toJson() => _$VirtualBackgroundSourceToJson(this);
}

Properties

backgroundSourceType
Custom background. See backgroundSourceType.
color
Color of the custom background image. The format is a hexadecimal integer defined in RGB, without the # symbol. For example, 0xFFB6C1 represents light pink. The default value is 0xFFFFFF, which represents white. The valid range is [0x000000, 0xffffff]. If the value is invalid, the SDK will replace the original background image with a white background.
Note: This parameter takes effect only when the custom background is one of the following types:
  • backgroundColor: The background image is a solid color image of the color passed in this parameter.
  • backgroundImg: If the image in source has a transparent background, the color passed in this parameter will be used to fill the transparent background.
source
The absolute local path of the custom background. Supports PNG, JPG, MP4, AVI, MKV, and FLV formats. If the path is invalid, the SDK will use the original background image or a solid color background specified by color.
Note: This parameter takes effect only when the custom background type is backgroundImg or backgroundVideo.
blurDegree
The blur level of the custom background image.
Note: This parameter takes effect only when the custom background type is backgroundBlur.