setBackgroundSticker abstract method

  1. @Deprecated('Deprecated since v3.50.1 and will be deleted in v3.56.1, use RTCVideoEffect.enableVirtualBackground and RTCVideoEffect.disableVirtualBackground instead.')
Future<int?> setBackgroundSticker({
  1. String? modelPath,
  2. VirtualBackgroundSource? source,
})

Sets the original background to a specified image or a solid color.

To disable this effect, set the modelPath parameter to null.

modelPath: The path of virtual background effects.

source: The local path of background images.

Returned value:

  • 0: Success.
  • 1000: The Effect SDK is not integrated.
  • 1001: This API is not available in your Effect SDK.
  • <0: Other errors. See Error Code Table.

Call the following APIs in sequence before calling this API:

  1. RTCVideo.checkVideoEffectLicense
  2. RTCVideo.setVideoEffectAlgoModelPath
  3. RTCVideo.enableVideoEffect

Implementation

@Deprecated(
    'Deprecated since v3.50.1 and will be deleted in v3.56.1, use RTCVideoEffect.enableVirtualBackground and RTCVideoEffect.disableVirtualBackground instead.')
Future<int?> setBackgroundSticker({
  String? modelPath,
  VirtualBackgroundSource? source,
});