enableVirtualBackground method
- NSString backgroundStickerPath,
- ByteRTCVirtualBackgroundSource source
@detail api @author zhushufan.ref @brief Sets the original background to a specified image or a solid color. @param backgroundStickerPath The absolute path of virtual background effects. @param source Virtual background source. See ByteRTCVirtualBackgroundSource{@link #ByteRTCVirtualBackgroundSource}. @return - 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. @note - You must call initCVResource:withAlgoModelDir:{@link #ByteRTCVideoEffect#initCVResource:withAlgoModelDir} before calling this API. - Call disableVirtualBackground{@link #ByteRTCVideoEffect#disableVirtualBackground} to turn off the virtual background.
Implementation
FutureOr<int> enableVirtualBackground(NSString backgroundStickerPath,
ByteRTCVirtualBackgroundSource source) async {
return await nativeCall(
'enableVirtualBackground:withSource:', [backgroundStickerPath, source]);
}