1import{r as e}from"./rolldown-runtime-DAXXjFlN.js";import{O as t}from"./dist-DiEP1Qns.js";import{D as n,On as r,Zn as i,_ as a,b as o,ct as s,er as c,mt as l,qt as u,vn as d}from"./runtime-core.esm-bundler-BKdLzFmX.js";import{t as f}from"./Modal-B-U8Tfwa.js";import{t as p}from"./helper-D5ziWoUd.js";import{t as m}from"./ModalCloseBold-Ck9M6-LM.js";var h=e({default:()=>y}),g={class:`rounded flex items-center xs:justify-center`},_=[`src`],v=[`src`],y={__name:`VideoPlayer`,props:[`videoCommentUrl`,`videoMeta`,`isSupportNote`],setup(e){let h=e;d(`video/mp4`);let y=d(``),b=d(``),x=d(),S=d(!1),C=d(null),w=d(S.value?`mx-3`:(h.isSupportNote?`w-[471px] h-[772px]`:`w-100 h-179`)+` xs:w-screen xs:h-fill-available`);s(()=>{y.value=h.videoMeta.thumbnail,T()==`landscape`&&(S.value=!0),p.isIOSDevice()||b.value.play()});let T=()=>{let e=b.value;if(!e)return`unknown`;let t=h.videoMeta.width||e.naturalWidth,n=h.videoMeta.height||e.naturalHeight;return t>n?`landscape`:t<n?`portrait`:`square`},E={play(){C.value&&C.value.play()},pause(){C.value&&C.value.pause()},seek(e){C.value&&(C.value.currentTime=e)}},D=()=>{E.play()},O=()=>{E.pause()},k=()=>{E.seek(b.value.currentTime)};return(s,d)=>(l(),o(`div`,{ref_key:`playerModalContainer`,ref:x,tabindex:`0`,onKeyup:d[3]||=t(e=>s.$emit(`close`),[`esc`])},[n(f,{outerClasses:`!overflow-y-hidden h-fill-available`,modalBgClass:`fixed inset-0 bg-black fade-in-modal`,modalClass:`w-full flex !my-0 justify-center h-fill-available`,onClose:d[2]||=e=>s.$emit(`close`)},{default:u(()=>[a(`div`,{style:c({backgroundImage:`linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),url(${r(y)})`}),class:`w-full absolute top-0 left-0 h-full blur-[6rem] bg-no-repeat bg-center bg-cover`},null,4),n(m,{fillClass:`fill-dark`,onClick:d[0]||=e=>s.$emit(`close`),class:`w-12 h-12 z-100 fixed md:absolute right-[30px] top-6 xs:right-3 xs:top-2 bg-white hover:bg-white/80`,iconSize:{width:18.57,height:18.57}}),a(`div`,g,[a(`div`,{class:i([r(w),`tw-bg-grey71/10 rounded-xl xs:rounded-none relative flex items-center justify-center focus-visible:outline-none select-none cursor-pointer`])},[a(`video`,{ref_key:`videoElem`,ref:b,onPlay:D,onPause:O,onSeeked:k,onWebkitendfullscreen:d[1]||=e=>s.$emit(`close`),playsinline:``,"webkit-playsinline":``,controls:``,class:i([{"fip-video":e.isSupportNote},`w-full xs:max-h-full max-h-[95vh] rounded-xl h-full object-cover focus-visible:outline-none`])},[a(`source`,{src:e.videoCommentUrl+`_converted.mp4`,type:`video/mp4`},null,8,_),a(`source`,{src:e.videoCommentUrl},null,8,v)],34)],2)])]),_:1})],544))}};export{y as n,h as t};
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.