import{x as a,L as k,a5 as B,r as c,o,a as r,t as e,b as p,d,e as _,K as S,B as N,H as g,G as V,J as L,A as j}from"./vendor.475775fc.js";import{l as M,g as z}from"./index.a0805cd9.js";import"./index.e07f9e9c.js";const R={class:"flex",style:{height:"calc(100vh - 84px)"}},T={style:{height:"100%"}},U=e("span",{class:"iconfont icon-shexiangtou text-blue margin-right-xs"},null,-1),A={style:{height:"30px","line-height":"30px","font-size":"14px","text-align":"center"}},D=["href"],E={class:"flex-sub padding-xs",style:{height:"100%"}},F={id:"vidBox"},G={class:"vidName"},H=["src"],J=e("video",{id:"video",autoplay:"",muted:"",controls:""},null,-1),O={__name:"realTimeMonitoring",setup(K){const s=location.protocol+"//"+window.location.host+"/";a(!1);const l=a(!1),m=a("\u9A7E\u9A76\u53F0"),h=a([]);let t=null;const f=n=>{z(n).then(i=>{t.connect(i.data[0].camera_rtsp),m.value=i.data[0].camera_name,l.value=!0})},v=function(){l.value=!1,t.connect(null)};function x(){M({}).then(n=>{h.value=n.data})}return x(),k(()=>{t=new WebRtcStreamer("video","http://127.0.0.1:8000")}),B(()=>{t.disconnect()}),(n,i)=>{const y=c("el-menu-item"),w=c("el-menu"),C=c("scrollContainer");return o(),r("div",R,[e("div",T,[p(C,{style:{width:"180px",height:"calc(100% - 30px)","overflow-x":"hidden"}},{default:d(()=>[p(w,{style:{"min-height":"100%"},onSelect:f},{default:d(()=>[(o(!0),r(V,null,L(_(h),(u,b)=>(o(),j(y,{index:""+u.camera_id,key:b},{title:d(()=>[U,e("span",null,g(u.camera_name),1)]),_:2},1032,["index"]))),128))]),_:1})]),_:1}),e("div",A,[e("a",{href:s+"alarm_folder/html_images/webrtc.rar"},"\u4E0B\u8F7D\u64AD\u653E\u63D2\u4EF6",8,D)])]),e("div",E,[e("div",F,[_(l)?N("",!0):(o(),r("div",{key:0,class:"noVid",style:S("background-image: url("+s+"alarm_folder/html_images/novideo.png);")},null,4)),e("div",G,[e("span",null,g(_(m)),1),e("img",{src:s+"alarm_folder/html_images/cha.png",style:{width:"12px",cursor:"pointer"},alt:"",onClick:v},null,8,H)]),J])])])}}};export{O as default};
