setWatermark method

Future<V2TXLiveCode> setWatermark(
  1. String type,
  2. String image,
  3. double x,
  4. double y,
  5. double scale,
)

设置推流器水印。默认情况下,水印不开启。

image 水印图片。如果该值为 null,则等效于禁用水印 x 水印的横坐标,取值范围为0 - 1的浮点数。 y 水印的纵坐标,取值范围为0 - 1的浮点数。 scale 水印图片的缩放比例,取值范围为0 - 1的浮点数。 @return 返回值 {@link V2TXLiveCode}

  • V2TXLIVE_OK: 成功

Implementation

Future<V2TXLiveCode> setWatermark(String type, String image, double x,
    double y, double scale) async {
  var result = await _channel.invokeMethod('setWatermark', {
    "type": type,
    "image": image,
    "x": x.toString(),
    "y": y.toString(),
    "scale": scale.toString()
  });
  return _liveCodeWithResult(result);
}