Skip to content

录像

方法名

startRecording

用法

示例

js
if (this.$refs.refLevenUvcMultiCamera) {
  this.$refs.refLevenUvcMultiCamera.startRecording({
    type: type
  }, res => {
    if (res.code == 0 && res.data && res.data.path) {
      if (res.data.index == 1) {
        this.videopath.leftPath = res.data.path;
      } else if (res.data.index == 2) {
        this.videopath.rightPath = res.data.path;
      }
    }
    this.writeLog(JSON.stringify(res))
  })
}

参数说明

参数名参数类型是否必填默认值参数描述
typeInteger摄像头位置,1.左侧,2.右侧,0.所有

回调

示例

json
{
    "message": "",
    "code": 0,
    "data": {
        "index":1,
        "status":"finish",
        "path":""
    }
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.indexInteger当前摄像头索引,1.左侧,2.右侧
data.statusString当前录制状态,start:开始录制,finish:录制完成
data.pathString录制视频的文件路径
codeInteger返回类型,0.成功,其他:失败