{"version":3,"file":"HLSPlayer_1.DFWan6a7.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/Bf8ST86Hyc9Y9bvFxWRN/2wguXI1JpjmeYEkqBX0k/HLSPlayer_1.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function HLSPlayerComponent({src,width=320,height=180}){const videoRef=useRef(null);useEffect(()=>{const video=videoRef.current;if(!video)return;video.muted=true;video.autoplay=true;video.loop=true;video.playsInline=true;const script=document.createElement(\"script\");script.src=\"https://cdn.jsdelivr.net/npm/hls.js@latest\";script.onload=()=>{// @ts-ignore\nconst Hls=window.Hls;if(Hls.isSupported()){const hls=new Hls;hls.loadSource(src);hls.attachMedia(video);}else if(video.canPlayType(\"application/vnd.apple.mpegurl\")){video.src=src;}};document.body.appendChild(script);},[src]);return /*#__PURE__*/_jsx(\"video\",{ref:videoRef,style:{width:\"100%\",height:\"100%\",borderRadius:0,backgroundColor:\"transparent\",objectFit:\"cover\",display:\"block\"},width:width,height:height});}export default HLSPlayerComponent;addPropertyControls(HLSPlayerComponent,{src:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\"},width:{type:ControlType.Number,title:\"Width\",defaultValue:320},height:{type:ControlType.Number,title:\"Height\",defaultValue:180}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HLSPlayerComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HLSPlayer_1.map"],"mappings":"gMAAmI,SAAS,EAAmB,CAAC,MAAI,QAAM,IAAI,SAAO,KAAK,CAAC,IAAM,EAASA,EAAO,KAAK,CACW,OADV,MAAc,CAAC,IAAM,EAAM,EAAS,QAAQ,GAAG,CAAC,EAAM,OAAO,EAAM,MAAM,GAAK,EAAM,SAAS,GAAK,EAAM,KAAK,GAAK,EAAM,YAAY,GAAK,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,6CAA6C,EAAO,WAAW,CACxd,IAAM,EAAI,EAAO,IAAI,GAAG,EAAI,aAAa,CAAC,CAAC,IAAM,EAAI,IAAI,EAAI,EAAI,WAAW,EAAI,CAAC,EAAI,YAAY,EAAM,MAAU,EAAM,YAAY,gCAAgC,GAAE,EAAM,IAAI,IAAO,SAAS,KAAK,YAAY,EAAO,EAAG,CAAC,EAAI,CAAC,CAAqB,EAAK,QAAQ,CAAC,IAAI,EAAS,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,aAAa,EAAE,gBAAgB,cAAc,UAAU,QAAQ,QAAQ,QAAQ,CAAO,QAAa,SAAO,CAAC,wBADlX,IAAoC,IAAoD,GAC2S,EAAmB,EAAoB,EAAmB,CAAC,IAAI,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,GAAG,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,IAAI,CAAC,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,IAAI,CAAC,CAAC"}