Skip to content

设置摄像头分辨率 1.6.0 ​

方法名 ​

setPreviewSize

用法 ​

示例 ​

js
if (this.$refs.refLevenUvcCamera) {
  this.$refs.refLevenUvcCamera.setPreviewSize({
    width:1920,
    height:1080
  },res => {
    this.writeLog(JSON.stringify(res))
  })
}

参数说明 ​

参数名参数类型是否必填默认值参数描述
widthInteger是无分辨率的款
heightInteger是无分辨率的高

回调 ​

示例 ​

json
{
  "data": {},
  "message": "",
  "code": 0
}

回调说明 ​

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
codeInteger返回类型,0.成功,其他:失败