setCameraTorch method

FutureOr<int> setCameraTorch(
  1. TorchState torchState
)

@detail api @author zhangzhenyu.samuel @brief 打开/关闭当前使用的摄像头(前置/后置)的闪光灯 @param torchState 闪光灯状态。参考 TorchState{@link #TorchState} @return - 0: 成功。 - < 0: 失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明。 @note - 必须已调用 startVideoCapture{@link #RTCEngine#startVideoCapture} 使用 SDK 内部采集模块进行视频采集时,才能设置闪光灯。 - 设置结果在调用 stopVideoCapture{@link #RTCEngine#stopVideoCapture} 关闭内部采集后失效。

Implementation

FutureOr<int> setCameraTorch(TorchState torchState) async {
  return await nativeCall('setCameraTorch', [torchState.$value]);
}