Skip to content

获取摄像头列表

方法名

getDeviceList

用法

示例

js
if (this.$refs.refLevenUvcCamera) {
  this.$refs.refLevenUvcCamera.getDeviceList(res => {
    this.writeLog(JSON.stringify(res))
  })
}

参数说明

回调

示例

json
{
    "message": "",
    "code": 0,
    "data": {
        "deviceList":[{
            "productId": 12337,
            "productName": "RXGD-CAMERA",
            "serialNumber": "200901010001",
            "deviceName": "/dev/bus/usb/003/003",
            "vendorId": 3034,
            "deviceId": 3003
        }]
    }
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.deviceListObject[]摄像头数据集合
data.deviceList.productIdInteger产品id
data.deviceList.productNameString产品名称
data.deviceList.serialNumberString串口号
data.deviceList.deviceNameString设备名称
data.deviceList.vendorIdInteger厂家id
data.deviceList.deviceIdInteger设备id
codeInteger返回类型,0.成功,其他:失败