import{n as s,a$ as V,d as D,aC as G,c as h,f as R,h as T,Z as w,a1 as O,a7 as i,a6 as u,T as t,a0 as r,br as C,a5 as v,bs as A,aQ as P,c$ as W,c1 as U,a9 as k,av as E,$ as F,b4 as L,bc as g,bo as Z}from"./index-a8341fa1.js";import"./dayjs-919e6097.js";import{u as H,D as Q,I as q,p as J}from"./index-cb44e888.js";import{V as X}from"./jb4-7b5b6ba3.js";import{G as Y,l as $}from"./gb28181-0e98f3aa.js";import{A as K}from"./index-5352c15f.js";import{_ as ee,D as _}from"./index-44447dae.js";var te={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const ae=te;function M(o){for(var e=1;e`${Y(n.isGbRecord)}${b.value}`);T([()=>n.id,()=>n.path],([l,a])=>{a?b.value=a:l&&(b.value=`${n.id}/${n.deviceId}`)},{immediate:!0});const y=()=>{const l=b.value.split("/");return{deviceId:l[0],channelId:l[1]}},z=H(),B=async l=>{g.destroy(),await $({...y(),ptzcmd:l}).then(async a=>{g.success(e("routes.screen.指令发送成功")),z.controlMode===q.CLICK&&j()}).catch(a=>{g.error(e("routes.screen.指令发送失败"))})},j=()=>{setTimeout(async()=>{await $({...y(),ptzcmd:J()})})},S=l=>{l==="in"&&p.value<100?p.value+=10:l==="out"&&p.value>40&&(p.value-=10)};return(l,a)=>(w(),O("div",ne,[i("div",{class:"flex flex-col gap-3 transition-all duration-300",style:E({width:`${p.value}%`,maxWidth:"100%"})},[i("div",oe,[i("div",re,[i("span",{style:m},u(t(e)("routes.screen.播放格式"))+":",1),s(t(A),{value:x.value,"onUpdate:value":a[0]||(a[0]=f=>x.value=f),size:"small"},{default:r(()=>[s(t(C),{value:"ws-flv"},{default:r(()=>a[5]||(a[5]=[v("WS-FLV")])),_:1}),s(t(C),{value:"webrtc"},{default:r(()=>a[6]||(a[6]=[v("WebRTC")])),_:1})]),_:1},8,["value"])]),i("div",ie,[i("span",{style:m},u(t(e)("routes.screen.缩放"))+":",1),s(t(P),{type:"text",size:"small",onClick:a[1]||(a[1]=()=>S("out")),disabled:p.value<=40},{default:r(()=>[s(t(le))]),_:1},8,["disabled"]),i("span",ue,u(p.value)+"%",1),s(t(P),{type:"text",size:"small",onClick:a[2]||(a[2]=()=>S("in")),disabled:p.value>=100},{default:r(()=>[s(t(W))]),_:1},8,["disabled"])])]),i("div",de,[s(X,{videoShadow:!0,streamPath:N.value,format:x.value,onPlay:c.value},{default:r(()=>[i("div",ce,u(b.value),1)]),_:1},8,["streamPath","format","onPlay"]),l.type==="vod"?(w(),O("div",pe,[i("div",fe,[s(t(K),{value:d.value,"onUpdate:value":a[3]||(a[3]=f=>d.value=f),class:"w-150px",max:4,min:.5,step:.5,tooltip:{formatter:f=>`${f}x`}},null,8,["value","tooltip"]),i("span",me,u(d.value)+" "+u(t(e)("routes.screen.倍速")),1)]),s(t(U),{checked:c.value,"onUpdate:checked":a[4]||(a[4]=f=>c.value=f),"checked-children":t(e)("routes.screen.播放"),"un-checked-children":t(e)("routes.screen.暂停"),class:"w-60px"},null,8,["checked","checked-children","un-checked-children"])])):k("",!0)])],4),l.id&&!l.type?(w(),F(t(L),{key:0,bordered:!1,class:"dark:bg-transparent ml-4 flex-shrink-0",bodyStyle:{width:"260px"}},{default:r(()=>[s(Q,{hanldeClick:B,allowed:!0,deviceId:y().deviceId,channelId:y().channelId},null,8,["deviceId","channelId"]),s(t(ee),{column:1,class:"mt-20px",layout:"vertical"},{default:r(()=>[s(t(_),{class:"!pb-8px",labelStyle:m,label:t(e)("routes.screen.设备名称")},{default:r(()=>[v(u(l.deviceName||"--"),1)]),_:1},8,["label"]),s(t(_),{class:"!pb-8px",labelStyle:m,label:t(e)("routes.screen.设备编号")},{default:r(()=>[v(u(l.id||"--"),1)]),_:1},8,["label"]),s(t(_),{class:"!pb-8px",labelStyle:m,label:t(e)("routes.screen.通道名称")},{default:r(()=>[v(u(l.channelName||"--"),1)]),_:1},8,["label"]),s(t(_),{class:"!pb-8px",labelStyle:m,label:t(e)("routes.screen.通道编号")},{default:r(()=>[v(u(l.deviceId||"--"),1)]),_:1},8,["label"])]),_:1})]),_:1})):k("",!0)]))}}),Ie=(o,e)=>{Z({content:()=>s(ve,o,null),modalConfig:{width:"80%",destroyOnClose:!0,footer:null,...e}})};export{Ie as u}; //# sourceMappingURL=usePlay-b0788e52.js.map