Appearance
摄像头数据
方法名
getCameraData
用法
示例
js
if (this.$refs.refLevenArcFacePro) {
this.$refs.refLevenArcFacePro.getCameraData(res => {
console.log(res)
});
}参数说明
无
回调
示例
json
{
"data": {
"supportedPreviewSizes": [
{
"height": 1080,
"width": 1920
},
{
"height": 1200,
"width": 1600
},
{
"height": 1080,
"width": 1440
},
{
"height": 1080,
"width": 1260
},
{
"height": 960,
"width": 1280
},
{
"height": 1080,
"width": 1080
},
{
"height": 720,
"width": 1584
},
{
"height": 1080,
"width": 960
},
{
"height": 768,
"width": 1280
},
{
"height": 720,
"width": 1280
},
{
"height": 768,
"width": 1024
},
{
"height": 738,
"width": 1024
},
{
"height": 720,
"width": 960
},
{
"height": 540,
"width": 960
},
{
"height": 720,
"width": 720
},
{
"height": 600,
"width": 800
},
{
"height": 480,
"width": 864
},
{
"height": 540,
"width": 720
},
{
"height": 480,
"width": 800
},
{
"height": 480,
"width": 720
},
{
"height": 480,
"width": 640
},
{
"height": 400,
"width": 640
},
{
"height": 360,
"width": 640
},
{
"height": 288,
"width": 352
},
{
"height": 240,
"width": 320
},
{
"height": 180,
"width": 320
},
{
"height": 144,
"width": 176
}
],
"cameraId": 1
},
"message": "",
"code": 0
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.supportedPreviewSizes | Object | 相机支持的预览分辨率 |
| data.supportedPreviewSizes.width | Integer | 分辨率的宽 |
| data.supportedPreviewSizes.height | Integer | 分辨率的高 |
| data.cameraId | Integer | 当前预览的摄像头,1.前置,0.后置 |
| code | Integer | 返回类型,0.成功,其他:失败 |
