7 lines
6.3 KiB
JavaScript
7 lines
6.3 KiB
JavaScript
|
/*!
|
||
|
* build: vue-admin-beautiful
|
||
|
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
|
||
|
* vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756
|
||
|
* time: 2024-10-10 11:14:28
|
||
|
*/
|
||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c65a26a"],{4543:function(e,t,o){"use strict";o.r(t);var i=o("f2bf");const c={key:0,class:"play"},d={key:1,class:"hello-ezuikit-js"},n={key:2,class:"hello-ezuikit-js"},a={style:{"text-align":"center"}};function r(e,t,o,r,l,s){const u=Object(i["resolveComponent"])("el-button");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[l.isplay?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",c,[Object(i["createVNode"])(u,{size:"mini",type:"primary",onClick:s.start},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.bf")),1)]),_:1},8,["onClick"])])):Object(i["createCommentVNode"])("",!0),l.showVideo?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",d,[t[0]||(t[0]=Object(i["createElementVNode"])("div",{id:"video-container",style:{width:"600px",height:"400px"}},null,-1)),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(u,{size:"mini",type:"primary",onClick:s.stop},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.tz")),1)]),_:1},8,["onClick"]),Object(i["createVNode"])(u,{size:"mini",type:"primary",onClick:s.play},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.bf")),1)]),_:1},8,["onClick"]),Object(i["createVNode"])(u,{size:"mini",type:"primary",onClick:s.capturePicture},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.bhtp")),1)]),_:1},8,["onClick"]),Object(i["createVNode"])(u,{size:"mini",type:"primary",onClick:s.fullScreen},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.qpxs")),1)]),_:1},8,["onClick"])])])):Object(i["createCommentVNode"])("",!0),l.isplay||l.showVideo?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",n,[Object(i["createElementVNode"])("p",a,Object(i["toDisplayString"])(l.msg),1)]))],64)}var l=o("7cf8"),s=o("c38d"),u=o.n(s);let p=null;var m={props:{deviceCode:{type:String,default:""}},data(){return{videoData:[],queryForm:{deviceCode:""},showVideo:!0,isplay:!0,msg:""}},watch:{deviceCode:function(e,t){this.queryForm.deviceCode=e,this.isplay=!0,this.showVideo=!0,this.getVideoPath()}},created(){},methods:{showData(e){this.queryForm.deviceCode=e.deviceCode,this.isplay=!0,this.showVideo=!0,this.getVideoPath()},start(){this.isplay=!1,this.showVideo=!0,this.getVideo()},async getVideoPath(){const{data:e,code:t,msg:o}=await Object(l["getLiveAddr"])(this.queryForm);-1==t?(this.showVideo=!1,this.isplay=!1,this.msg=o):(this.videoData=e,this.showVideo=!1,this.isplay=!0)},getVideo(){const e=this;p=new u.a.EZUIKitPlayer({id:"video-container",autoplay:!1,accessToken:e.videoData.accessToken,url:e.videoData.url,template:"simple",plugin:["talk"],width:700,height:400}),window.player=p},play(){const e=p.play();e.then(e=>{console.log("promise 获取 数据",e)})},stop(){const e=p.stop();e.then(e=>{console.log("promise 获取 数据",e)})},getOSDTime(){const e=p.getOSDTime();e.then(e=>{console.log("promise 获取 数据",e)})},capturePicture(){const e=p.capturePicture(""+(new Date).getTime());e.then(e=>{console.log("promise 获取 数据",e)})},openSound(){const e=p.openSound();e.then(e=>{console.log("promise 获取 数据",e)})},closeSound(){const e=p.closeSound();e.then(e=>{console.log("promise 获取 数据",e)})},startSave(){const e=p.startSave(""+(new Date).getTime());e.then(e=>{console.log("promise 获取 数据",e)})},stopSave(){const e=p.stopSave();e.then(e=>{console.log("promise 获取 数据",e)})},ezopenStartTalk(){p.startTalk()},ezopenStopTalk(){p.stopTalk()},fullScreen(){p.fullScreen()},destroy(){const e=p.destroy();e.then(e=>{console.log("promise 获取 数据",e)})}}},h=(o("4771"),o("d959")),f=o.n(h);const v=f()(m,[["render",r]]);t["default"]=v},4771:function(e,t,o){"use strict";o("d93d")},"7cf8":function(e,t,o){"use strict";o.r(t),o.d(t
|