setVideoWatermark method
- NSString imagePath,
- ByteRTCVideoWatermarkConfig rtcWatermarkConfig
@detail api
@hiddensdk(audiosdk)
@author zhushufan.ref
@brief Adds watermark to designated video stream.
@param imagePath The absolute path of the watermark image. The path should be less than 512 bytes.
The watermark image should be in PNG or JPG format.
@param rtcWatermarkConfig Watermark configurations. See ByteRTCVideoWatermarkConfig{@link #ByteRTCVideoWatermarkConfig}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
@note
- Call clearVideoWatermark{@link #ByteRTCEngine#clearVideoWatermark} to remove the watermark on the designated video stream.
- You can only add one watermark to one video stream. The newly added watermark replaces the previous one. You can call this API multiple times to add watermarks to different streams.
- You can call this API before and after joining room.
- If you mirror the preview, or the preview and the published stream, the watermark will also be mirrored locally, but the published watermark will not be mirrored.
- When you enable simulcast mode, the watermark will be added to all video streams, and it will scale down to smaller encoding configurations accordingly.
Implementation
FutureOr<int> setVideoWatermark(NSString imagePath,
ByteRTCVideoWatermarkConfig rtcWatermarkConfig) async {
return await nativeCall('setVideoWatermark:withRtcWatermarkConfig:',
[imagePath, rtcWatermarkConfig]);
}