jb4-28542242.js 1.2 KB

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