1import{d as $,ao as u}from"./entry.3578af79.js";import{a as n,b as x,F as _,G as p,H as c,W as k,_ as U}from"./swiper-vue.b49379b0.js";const w=["src"],N={key:1,class:"text-red-500"},R={__name:"VideoPlayer",props:{fileName:{type:String,required:!0},memberId:{type:String,required:!0},type:{type:String,required:!0}},setup(y){const o=y,t=n(""),v=n("application/x-mpegURL"),l=n(null),s=n(!1);function d(a,e){if(o.type==="blog"){const i=a.match(/^(.+)\.(\w+)\.jpg$/);if(!i||!e||e.length<2)return"";const m=i[1],h=i[2],f=e[0],g=e[1];return s.value?`${$().apiBaseUrl}/video/blog/${f}/${g}/${e}/${m}.${h}`:`https://video.yes24.com/blog/${f}/${g}/${e}/${m}_,2,4,6,000k.mp4.smil/master.m3u8`}}function r(){if(s.value){v.value=`video/${o.fileName.match(/\.(\w+)\.jpg$/)[1]}`,l.value.src=t.value;return}if(u.isSupported()&&l.value&&t.value){const a=new u;a.loadSource(t.value),a.attachMedia(l.value),a.on(u.Events.ERROR,(e,i)=>{i.fatal&&(s.value=!0,t.value=d(o.fileName,o.memberId),r())})}else l.value&&l.value.canPlayType("application/vnd.apple.mpegurl")&&(l.value.src=t.value)}return x(()=>[o.fileName,o.memberId],([a,e])=>{s.value=!1,v.value="application/x-mpegURL",t.value=d(a,e),r()},{immediate:!0}),_(()=>{r()}),(a,e)=>(p(),c("div",{style:{width:"100%",height:"100%",position:"absolute"},onClick:e[1]||(e[1]=()=>{console.log("in video div")})},[t.value?(p(),c("video",{key:0,ref_key:"videoElement",ref:l,controls:"",class:"w-full",style:{width:"100%","max-height":"480px"},onClick:e[0]||(e[0]=()=>{console.log("in video")})},[k("source",{src:t.value,type:"application/x-mpegURL"},null,8,w),U(" ë¸ë¼ì°ì ê° ë¹ëì¤ í그를 ì§ìíì§ ììµëë¤. ")],512)):(p(),c("p",N,"ì못ë ë¹ëì¤ íì¼ ì´ë¦ ëë íì IDì
ëë¤"))]))}},P=R;export{P as V};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.