setCameraZoomRatio method

Future<int?> setCameraZoomRatio(
  1. double value
)

设置摄像头缩放因子(焦距)

注意:此接口只支持和Android和iOS平台

取值范围1 - 5,取值为1表示最远视角(正常镜头),取值为5表示最近视角(放大镜头)。 最大值推荐为5,若超过5,视频数据会变得模糊不清。

参数:

value 取值范围:1-5。值越大,焦距越远

返回值: 0:成功;负数:失败

Implementation

Future<int?> setCameraZoomRatio(double value // 取值范围为1 - 5,数值越大,焦距越远。
    ) async {
  var result = await _channel.invokeMethod('setCameraZoomRatio', {
    "value": value.toString(),
  });
  return V2TXLiveFlutterResult.intValue(result);
}