AgoraVirtualBackgroundSource
自定义的背景。
Objective-C
__attribute__((visibility("default"))) @interface AgoraVirtualBackgroundSource : NSObject
@property(nonatomic, assign) AgoraVirtualBackgroundSourceType backgroundSourceType NS_SWIFT_NAME(backgroundSourceType);
@property(nonatomic, assign) NSUInteger color NS_SWIFT_NAME(color);
@property(nonatomic, copy) NSString* _Nullable source NS_SWIFT_NAME(source);
@property(nonatomic, assign) AgoraBlurDegree blurDegree;
@end
backgroundSourceType
自定义的背景。详见 AgoraVirtualBackgroundSourceType
。
color
自定义的背景图颜色。格式为 RGB 定义下的十六进制整数,不要带 # 号,如 0xFFB6C1 表示浅粉色。 默认值为 0xFFFFFF,表示白色。 取值范围为 [0x000000,0xffffff]。如果取值非法,SDK 会用白色背景图替换原背景图。
注意: 该参数仅在自定义背景图类型为 AgoraVirtualBackgroundColor 时生效。
source
自定义背景图的本地绝对路径。支持 PNG 和 JPG 格式。如果路径无效,SDK 会用白色背景图替换原背景图。
注意: 该参数仅在自定义背景图类型为 AgoraVirtualBackgroundImg 时生效。
blurDegree
自定义背景图的模糊程度。详见 AgoraBlurDegree
。注意: 该参数仅在自定义背景图类型为 AgoraVirtualBackgroundBlur 时生效。