setDummyCaptureImagePath abstract method

Future<int?> setDummyCaptureImagePath(
  1. String filePath
)

Sets an alternative image when the local internal video capture is not enabled.

Call this API repeatedly can update the image.
You can set the path to null or open the camera to stop publishing the image.

filePath: The path of the static image.
You can use the absolute path (file://xxx) or the asset directory path (/assets/xx.png). The maximum size for the path is 512 bytes.
You can upload a .JPG, .JPEG, .PNG, or .BMP file.
When the aspect ratio of the image is inconsistent with the video encoder configuration, the image will be proportionally resized, with the remaining pixels rendered black. The framerate and the bitrate are consistent with the video encoder configuration.

Return value:

  • 0: Success.
  • -1: Failure.

Notes:

  • You cannot locally preview the image.
  • You can call this API before and after joining an RTC room. In the multi-room mode, the image can be only displayed in the room you publish the stream.
  • You cannot apply effects like filters and mirroring to the image, while you can watermark the image.
  • The image is not effective for a screen-sharing stream.
  • When you enable the simulcast mode, the image will be added to all video streams, and it will be proportionally scaled down to smaller encoding configurations.

Implementation

Future<int?> setDummyCaptureImagePath(String filePath);