dahua-video
v1.0.8
Published
A Vue.js project
Downloads
5
Readme
dahua-video
用于大华视频接入vue项目
Getting started
Installation
npm install dahua-video --save-dev
Example
<dahua-video ref="dhVideo" :oWebWidth="800" :oWebHeight="500"
@initVideoCallBack="initVideoCallBack"></dahua-video>
import DahuaVideo from 'dahua-video'
export default {
components: { DahuaVideo },
data() {
return {
url: {
getVideo: ''//视频登陆接口
}
}
},
methods: {
initVideoCallBack(val) {
console.log(val ? '视频插件启动成功' : '视频插件启动失败')
if (val) {
getAction(this.url.getVideo, {}).then((obj) => {
this.$refs.dhVideo.cameraCode = '3' //视频code
this.$refs.dhVideo.playVideo(obj)
})
}
}
}
}