Image Source

enableVideoImageSource

Sets whether to replace the current video with an image when publishing the video stream.

virtual int enableVideoImageSource(bool enable, const ImageTrackOptions& options) = 0;

You can call this method to replace the current video with a custom image when publishing the video stream. After enabling this feature, you can set the replacement image through the options parameter. If disabled, remote users will see your original video stream.

Timing

Call this method after joining a channel.

Parameters

enable
Whether to replace the current video with a custom image:
  • true: Replace with custom image.
  • false: (Default) Do not replace.
options
Image configuration. See ImageTrackOptions.

Return Values

  • 0: Success.
  • < 0: Failure.