当前位置: 首页 > news >正文

在线查询网站收录中心城网站建设

在线查询网站收录,中心城网站建设,网络服务投诉平台,莱州做网站的公司vue播放rtsp流视频监控-海康摄像头使用工具vuejsencryptjsWebControl思路解决办法1:弹出新页面vue代码解决办法2:采用组建的方式使用工具vuejsencryptjsWebControl 注:使用海康demo,下载地址:https://open.hikvision.com/download/5c67f20bb254d61550c2f63e?type10 需要注册播放rtsp流视频监控-海康摄像头使用工具vuejsencryptjsWebControl思路解决办法1:弹出新页面vue代码解决办法2:采用组建的方式使用工具vuejsencryptjsWebControl 注:使用海康demo,下载地址:https://open.hikvision.com/download/5c67f20bb254d61550c2f63e?type10 需要注册登录。 思路 基于海康demo在vue上实现,剔除了海康demo的jquery。 vue直接引入jsWebControl会报错!!!直接在index.html里面引入js script srcjs/videojs-contrib-hls.min.js/scriptscript srcjs/jsencrypt.min.js/script解决办法1:弹出新页面vue代码 刚开始将视频窗体放在dialog里面发现无法关闭窗体也找不到元素。最终选择 window.open方式弹出新窗体解决的朋友可以留言。 templatediv classwebControl!--视频窗口展示--div idplayWnd classplayWnd styleleft: 109px; top: 133px;span v-ifloading插件未启动正在尝试启动请稍候.../span/div/div /templatescript export default {name: webControl,data: function() {return {loading: false,initCount: 0,pubKey: ,oWebControl: null,id: ,message: {ip: ,port: ,appkey: ,secret: }}},async mounted() {this.id this.getQueryString(name)let res await this.$http.get(’)//从接口请求得到所需要的ip,port,appkey,secretif (res.code 0) {this.message res.data} else {this.$message.error(获取数据失败: res.message)}this.initPlugin()},methods: {//获取路由参数getQueryString(name) {var reg new RegExp((^|) name ([^]*)(|$), i)var r window.location.search.substr(1).match(reg)if (r ! null) return decodeURI(r[2])return null},//预览handelShow() {let that thisvar cameraIndexCode this.id //获取输入的监控点编号值必填var streamMode 0 //主子码流标识0-主码流1-子码流var transMode 1 //传输协议0-UDP1-TCPvar gpuMode 0 //是否启用GPU硬解0-不启用1-启用var wndId -1 //播放窗口序号在2x2以上布局下可指定播放窗口cameraIndexCode cameraIndexCode.replace(/(^\s*)/g, )cameraIndexCode cameraIndexCode.replace(/(\s*$)/g, )that.oWebControl.JS_RequestInterface({funcName: startPreview,argument: JSON.stringify({cameraIndexCode: cameraIndexCode, //监控点编号streamMode: streamMode, //主子码流标识transMode: transMode, //传输协议gpuMode: gpuMode, //是否开启GPU硬解wndId: wndId //可指定播放窗口})})},// 创建播放实例initPlugin() {let that this// eslint-disable-next-line no-undefthat.oWebControl new WebControl({szPluginContainer: playWnd, // 指定容器idiServicePortStart: 15900, // 指定起止端口号建议使用该值iServicePortEnd: 15909,szClassId: 23BF3B0A-2C56-4D97-9C03-0CB103AA8F11, // 用于IE10使用ActiveX的clsidcbConnectSuccess: function() {console.log(插件启动成功)this.loading false// 创建WebControl实例成功that.oWebControl.JS_StartService(window, {// WebControl实例创建成功后需要启动服务dllPath: ./VideoPluginConnect.dll // 值./VideoPluginConnect.dll写死}).then(function() {// 启动插件服务成功that.oWebControl.JS_SetWindowControlCallback({// 设置消息回调cbIntegrationCallBack: that.cbIntegrationCallBack})that.oWebControl.JS_CreateWnd(playWnd, 1000, 600).then(function() {//JS_CreateWnd创建视频播放窗口宽高可设定that.init() // 创建播放实例成功后初始化})},function() {// 启动插件服务失败})},cbConnectError: function() {// 创建WebControl实例失败that.oWebControl nullthis.loading true// eslint-disable-next-line no-undefWebControl.JS_WakeUp(VideoWebPlugin://) // 程序未启动时执行error函数采用wakeup来启动程序that.initCountif (that.initCount 3) {setTimeout(function() {that.initPlugin()}, 3000)} else {that.$confirm(插件启动失败请检查插件是否安装, 提示, {confirmButtonText: 确定,cancelButtonText: 取消,type: warning}).then(() {location.href 插件没有安装则从接口下载VideoWebPlugin.exe插件}).catch(() {this.$message({type: info,message: 已取消删除})})}},cbConnectClose: function() {// 异常断开bNormalClose false// JS_Disconnect正常断开bNormalClose truethat.oWebControl null}})},// 推送消息cbIntegrationCallBack() {// showCBInfo(JSON.stringify(oData.responseMsg))},//初始化init() {let that thisthis.getPubKey(function() {// 请自行修改以下变量值 var appkey that.message.appkey//综合安防管理平台提供的appkey必填var secret that.setEncrypt(that.message.secret) //综合安防管理平台提供的secret必填var ip that.message.ip //综合安防管理平台IP地址必填var playMode 0 //初始播放模式0-预览1-回放var port that.message.port //综合安防管理平台端口若启用HTTPS协议默认443var snapDir D:\\SnapDir //抓图存储路径var videoDir D:\\VideoDir //紧急录像或录像剪辑存储路径var layout 1x1 //playMode指定模式的布局var enableHTTPS 1 //是否启用HTTPS协议与综合安防管理平台交互这里总是填1var encryptedFields secret //加密字段默认加密领域为secretvar showToolbar 1 //是否显示工具栏0-不显示非0-显示var showSmart 1 //是否显示智能信息如配置移动侦测后画面上的线框0-不显示非0-显示var buttonIDs 0,16,256,257,258,259,260,512,513,514,515,516,517,768,769 //自定义工具条按钮// 请自行修改以上变量值 that.oWebControl.JS_RequestInterface({funcName: init,argument: JSON.stringify({appkey: appkey, //API网关提供的appkeysecret: secret, //API网关提供的secretip: ip, //API网关IP地址playMode: playMode, //播放模式决定显示预览还是回放界面port: port, //端口snapDir: snapDir, //抓图存储路径videoDir: videoDir, //紧急录像或录像剪辑存储路径layout: layout, //布局enableHTTPS: enableHTTPS, //是否启用HTTPS协议encryptedFields: encryptedFields, //加密字段showToolbar: showToolbar, //是否显示工具栏showSmart: showSmart, //是否显示智能信息buttonIDs: buttonIDs //自定义工具条按钮})}).then(function() {that.oWebControl.JS_Resize(1000, 600) // 初始化后resize一次规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题that.handelShow()})})},//获取公钥getPubKey(callback) {let that thisthat.oWebControl.JS_RequestInterface({funcName: getRSAPubKey,argument: JSON.stringify({keyLength: 1024})}).then(function(oData) {if (oData.responseMsg.data) {that.pubKey oData.responseMsg.datacallback()}})},//RSA加密setEncrypt(value) {let that this// eslint-disable-next-line no-undefvar encrypt new JSEncrypt()encrypt.setPublicKey(that.pubKey)return encrypt.encrypt(value)}} } /scriptstyle scoped .playWnd {margin: 30px 0 0 400px;width: 1000px;/*播放容器的宽和高设定*/height: 600px; } /style 解决办法2:采用组建的方式 采用组件引用方式惊喜的发现这种方式初始化时不需要过setWndCover修改定位销毁组件使用JS_DestroyWnd切换视频时先通过stopAllPreview停止所有预览再次startPreview预览
http://www.sadfv.cn/news/274260/

相关文章:

  • dede 网站内页标题修改中铁十六局门户网
  • 洛阳住房和城乡建设厅网站php mysql 网站模板
  • 国外金融网站设计欣赏一起做网店网站官方
  • 毕业设计都是做网站吗咨询公司税率是多少
  • 网站建设十佳怎样建立网站的快捷方式
  • 电商培训类网站模板长春做网站的公司哪家好
  • 奇艺广州网站建设熊掌号wordpress中文文档
  • 万维网站域名做设计英文网站
  • 补习吧 一家专门做家教的网站找人网站 优帮云
  • 网站下载链接怎么做wordpress不同分类
  • ps做图 游戏下载网站有哪些空间 wordpress
  • 做网站推广 优帮云企业logo设计方案
  • 广州网站排名优化报价一天赚50元的游戏
  • 仿制手机网站教程在服务器网站上做跳转页面跳转
  • 开网站做商城怎么样如何利用国外网站开发客户
  • 专业苏州网站建设珠海微网站进入
  • 专科网站开发就业方向网站优化建设南昌
  • 单页面推广网站.net 网站 数据库配置文件
  • ie兼容所有网站2023广东佛山最新感染病例
  • 建设网站虚拟现实技术网站的网页建设知识ppt
  • 浮梁网站推广wordpress后台错位
  • 河北中小企业网站go语言可以做网站吗
  • 网站管理员怎么联系搜索引擎推广简称
  • 南宁建站公司有哪些框架网站怎么做
  • 如何创建网站小程序关键词推广seo怎么优化
  • 加盟的网站建设教育类集群网站建设
  • 阿里云做网站官网h5网页制作基础教程
  • 网站建设发展现状宝安中心医院官网
  • 网站建设范文制作单网页网站
  • 郴州网站制作公司有哪些百度提交网址多久才会收录