import{u as G,r as s,an as M,a as Q,a8 as ee,P as ae,g as u,ae as le,X as E,o as P,h as V,i as l,w as n,m as o,z as te,B as ne,j as oe,t as se,Y as I,n as ce,Z as ie,_ as ue,$ as re}from"./vendor.5f04cee5.js";import{b as de}from"./allReq.b72dd284.js";import{E as ve}from"./ezuikit.83a44b16.js";import{_ as fe}from"./index.ede965c9.js";const pe=m=>(ie("data-v-ea9120a8"),m=m(),ue(),m),_e={class:"padding-lr-sm",style:{height:"calc(100vh - 84px)"}},he={class:"head-container"},me={class:"head-container",style:{height:"calc(100vh - 126px)","overflow-y":"auto"}},ge={style:{height:"calc(100vh - 84px)",width:"100%"}},Se={class:"noBg"},ye=pe(()=>o("div",{id:"playWind"},null,-1)),xe={class:"Tool"},ke={setup(m){const j=G(),{proxy:g}=re(),k=s(!1),S=s(!1),p=s(!0),r=s(!1),_=s(!1);var e=null,y=[],w=[];const b=s(null),d=s([]),c=s({id:""}),N=s(""),D=M({queryParams:{deviceSerial:"",accessToken:Q.get("Open-Token")}}),{queryParams:v}=ee(D),z=function(a){if(a=="")d.value=y;else{let t=[];y.forEach(x=>{JSON.stringify(x).indexOf(a)!=-1&&t.push(x)}),d.value=t}},B=function(a){d.value.forEach(t=>{t.channelNo==a&&(t.status==0?g.$modal.msgError("\u6444\u50CF\u5934\u79BB\u7EBF\uFF01\uFF01\uFF01"):(c.value=t,q()))})},C=function(){d.value=[],y=[],w=[],v.value.deviceSerial!=""&&v.value.deviceSerial!=null&&(k.value=!0,de(v.value).then(a=>{a.code==200&&(w=a.data),$(),k.value=!1}))},$=function(){let a=[];w.forEach(t=>{t.channelName.indexOf("@")==-1&&a.push(t)}),y=a,d.value=a},L=function(){O(),g.$modal.msgError("\u89C6\u9891\u64AD\u653E\u5931\u8D25\uFF01\uFF01\uFF01")},R=function(){S.value=!0},q=function(){e==null?e=new ve.EZUIKitPlayer({id:"playWind",accessToken:v.value.accessToken,url:"ezopen://open.ys7.com/"+c.value.deviceSerial+"/"+c.value.channelNo+".live",plugin:["talk"],width:b.value.clientWidth,height:b.value.clientHeight,autoplay:!0,audio:!1,handleError:L,handleSuccess:R}):e.stop().then(()=>{e.play({url:"ezopen://open.ys7.com/"+c.value.deviceSerial+"/"+c.value.channelNo+".live"})})},O=function(){e!=null&&(e.stop(),e=null,S.value=!1,p.value=!0,_.value=!1,r.value=!1,c.value={id:""})},U=function(){if(e!=null){var a=e.capturePicture(new Date().getTime());a.then(t=>{})}},W=function(){e!=null&&(p.value?(e.stop(),p.value=!1):(e.play(),p.value=!0))},Z=function(){e!=null&&(r.value?e.stopSave().then(t=>{g.$modal.msgSuccess("\u5F55\u5236\u7ED3\u675F\uFF01\uFF01\uFF01"),r.value=!1}):e.startSave(new Date().getTime()+".mp4").then(t=>{g.$modal.msgSuccess("\u5F00\u59CB\u5F55\u5236\uFF01\uFF01\uFF01"),r.value=!0}))},K=function(){e!=null&&(_.value?(e.closeSound(),_.value=!1):(e.openSound(),_.value=!0))},A=function(){e!=null&&e.fullScreen()};return ae(()=>j.state.data.curShipDevice,a=>{v.value.deviceSerial=a,C()}),v.value.deviceSerial=j.state.data.curShipDevice,C(),(a,t)=>{const x=u("el-input"),i=u("svg-icon"),F=u("el-menu-item"),H=u("el-menu"),T=u("el-col"),f=u("el-tooltip"),J=u("el-row"),X=le("loading");return E((P(),V("div",_e,[l(J,{gutter:20},{default:n(()=>[l(T,{span:3,xs:24},{default:n(()=>[o("div",he,[l(x,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD",onInput:z,modelValue:N.value,"onUpdate:modelValue":t[0]||(t[0]=h=>N.value=h),clearable:"","prefix-icon":"Search",style:{"margin-top":"10px"}},null,8,["modelValue"])]),o("div",me,[l(H,{"default-active":c.value.channelNo,onSelect:B},{default:n(()=>[(P(!0),V(te,null,ne(d.value,(h,Y)=>(P(),oe(F,{index:""+h.channelNo,key:Y},{title:n(()=>[l(i,{"icon-class":h.status==1?"shexiangtou":"shexiangtounot",class:"margin-right-xs text-bold text-lg",style:{color:"#409eff"}},null,8,["icon-class"]),o("span",null,se(h.channelName),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"])])]),_:1}),l(T,{span:21,xs:24},{default:n(()=>[o("div",ge,[o("div",{class:"videobox",ref_key:"videoRef",ref:b},[E(o("div",Se,null,512),[[I,!S.value]]),ye],512),o("div",xe,[o("div",null,[l(f,{class:"item",effect:"dark",content:"\u6682\u505C/\u64AD\u653E",placement:"top"},{default:n(()=>[E(l(i,{"icon-class":p.value?"pause":"bofang",onClick:W},null,8,["icon-class"]),[[I,S.value]])]),_:1}),l(f,{class:"item",effect:"dark",content:"\u622A\u56FE",placement:"top"},{default:n(()=>[l(i,{"icon-class":"camerafull",onClick:U})]),_:1}),l(f,{class:"item",effect:"dark",content:"\u58F0\u97F3",placement:"top"},{default:n(()=>[l(i,{"icon-class":_.value?"shengyin_kai":"shengyin_guan",onClick:K},null,8,["icon-class"])]),_:1}),l(f,{class:"item",effect:"dark",content:"\u5F55\u50CF",placement:"top"},{default:n(()=>[l(i,{"icon-class":r.value?"radio":"luxiang",style:ce("color:"+(r.value?"red":"")),onClick:Z},null,8,["icon-class","style"])]),_:1})]),o("div",null,[l(f,{class:"item",effect:"dark",content:"\u5173\u95ED",placement:"top"},{default:n(()=>[l(i,{"icon-class":"guanji",style:{color:"red"},onClick:O})]),_:1}),l(f,{class:"item",effect:"dark",content:"\u5168\u5C4F",placement:"top"},{default:n(()=>[l(i,{"icon-class":"fullscreen",style:{"font-size":"0.9em"},onClick:A})]),_:1})])])])]),_:1})]),_:1})])),[[X,k.value]])}}};var je=fe(ke,[["__scopeId","data-v-ea9120a8"]]);export{je as default};