Appearance
切换摄像头
方法名
switchCamera
用法
示例
js
if (this.$refs.refLevenUvcCamera) {
this.$refs.refLevenUvcCamera.switchCamera({
//摄像头名称
deviceName: this.deviceList[this.deviceIndex].deviceName
}, res => {
this.writeLog(JSON.stringify(res))
})
}参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 参数描述 |
|---|---|---|---|---|
| deviceName | String | 是 | 无 | 摄像头名称 |
回调
示例
json
{
"message": "",
"code": 0,
"data": {
"deviceList":[{
"productId": 12337,
"productName": "RXGD-CAMERA",
"serialNumber": "200901010001",
"deviceName": "/dev/bus/usb/003/003",
"vendorId": 3034,
"deviceId": 3003
}]
}
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.deviceList | Object[] | 摄像头数据集合 |
| data.deviceList.productId | Integer | 产品id |
| data.deviceList.productName | String | 产品名称 |
| data.deviceList.serialNumber | String | 串口号 |
| data.deviceList.deviceName | String | 设备名称 |
| data.deviceList.vendorId | Integer | 厂家id |
| data.deviceList.deviceId | Integer | 设备id |
| code | Integer | 返回类型,0.成功,其他:失败 |
