import{d as f,k as r,o as p,w as _,x as m,U as i,V as v,a8 as c,$ as y,u as h,a3 as g,af as b}from"./vue-18ee037d.js";import"./dayjs-4778c158.js";import{af as k,av as w,N as B}from"./index-d6683aa1.js";const P={class:"video-container"},x={class:"container-shell"},V=f({__name:"jb4",props:{videoShadow:null,streamPath:null,format:null},setup(u){const a=u,t=r(!0),s=r(null);let e=null;const n=()=>{s.value&&(e=new window.Jessibuca({container:s.value,videoBuffer:.2,isResize:!1,text:"",loadingText:"加载中...",debug:!1,hotKey:!1,autoWasm:!0,heartTimeout:5,timeout:10,supportDblclickFullscreen:!1}),e.on("load",()=>{t.value=!1}),e.on("error",()=>{t.value=!1}),e.play(`${w("hdl","")}/${a.streamPath}.flv`))};p(()=>{a.streamPath,a.streamPath&&l()}),_(()=>a.streamPath,o=>{o&&l()});function l(){e?e.destroy().then(n):n()}m(d);async function d(){e&&(await e.destroy(),e=null)}return(o,C)=>(i(),v("div",P,[c("div",x,[c("div",{ref_key:"playerContainer",ref:s,class:"player-container"},null,512),t.value?(i(),y(h(k),{key:0,class:"loading",size:"large"})):g("",!0),b(o.$slots,"default",{},void 0,!0)])]))}});const U=B(V,[["__scopeId","data-v-b404a513"]]);export{U as V};