hik
$ npm install aecc-hik-player
视频插件安装在项目根路径:VideoPluginConnect.dll
<hik-live :hikOpt="hikOpt"></hik-live>
参数:
hikOpt:{
ip:'ip',//必传
port: port,//必传,注意是数字不是字符串
appkey:'appkey',//必传
secret:'secret'//必传
}
播放调用方法:videoPreview({cameraId: 'cameraId'})
<hik-playback :hikOpt="hikOpt"></hik-playback>
参数:
hikOpt:{
ip:'ip',//必传
port: port,//必传,注意是数字不是字符串
appkey:'appkey',//必传
secret:'secret'//必传
}
播放调用方法:videoPlayback({cameraId: 'cameraId',startTime:'2020-01-01 00:00:00',endTime:'2020-01-01 23:59:59'})
<hik-camera :treeData="treeData" v-model="selectCameraIds" :cameraOpt="cameraOpt" @change="change" @treeClick="treeClick"></hik-camera>
参数:
treeData: [
{
id:'1',
name: 'aaaa',
parentId: '0',
}
], //摄像头区域树形结构
cameraOpt: {
key: 'id',
label: 'name',
cameraList: [{
id: '2',
name: 'bbbb'
}] //摄像头列表
},
selectCameraIds: [{
id: '2',
name: 'bbbb'
}] //已选摄像头列表
方法:change(node),treeClick(node)
// 全局安装
import aeccHikPlayer from 'aecc-hik-player'
const { hikLive, hikPlayback } = aeccHikPlayer
Vue.use(hikLive)
Vue.use(hikPlayback)
// 按需加载
import { hikLive, hikPlayback, hikCamera } from 'aecc-hik-player'
Vue.component('hikLive', hikLive)