enableVirtualBackground abstract method
Future<int?>
enableVirtualBackground({
- required String modelPath,
- required VirtualBackgroundSource source,
Sets the original background to a specified image or a solid color.
modelPath
: The absolute path of virtual background effects.
source
: Virtual background source.
Return value:
- 0: Success.
- –1000: The Effects SDK is not integrated.
- –1001: This API is unavailable for your Effects SDK.
- –1002: Your Effects SDK's version is incompatible.
- < 0: Other error. See error code table for specific instructions.
Notes:
- You must call initCVResource before calling this API.
- Call disableVirtualBackground to turn off the virtual background.
Implementation
Future<int?> enableVirtualBackground({
required String modelPath,
required VirtualBackgroundSource source,
});