{"version":3,"file":"LoopVideoPlayer.C14M4e_i.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/FHJZmc9JNqCyi3gedAOw/ZwGC7crhoLTLTnGamwJO/LoopVideoPlayer.js"],"sourcesContent":["// Non-interactive looping video player with upload and link support\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useRef,useEffect}from\"react\";/**\n * Non-interactive Loop Video Player\n *\n * @framerIntrinsicWidth 480\n * @framerIntrinsicHeight 270\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function LoopVideoPlayer(props){const{videoFile=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoLink,background,borderRadius,enableExtras=false,image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},url=\"\",style}=props;const videoRef=useRef(null);const src=videoLink?videoLink:videoFile;useEffect(()=>{if(videoRef.current){videoRef.current.play().catch(()=>{});}},[src]);// If enableExtras and image is set, show image instead of video\nif(enableExtras&&image?.src&&!videoLink&&!videoFile){return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",background,borderRadius,overflow:\"hidden\",position:\"relative\",pointerEvents:\"none\",userSelect:\"none\"},children:[/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt||\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius,display:\"block\",pointerEvents:\"none\",userSelect:\"none\"}}),url&&/*#__PURE__*/_jsx(\"a\",{href:url,target:\"_blank\",rel:\"noopener noreferrer\",style:{position:\"absolute\",bottom:16,right:16,background:\"rgba(0,0,0,0.7)\",color:\"#fff\",padding:\"8px 16px\",borderRadius:6,textDecoration:\"none\",fontSize:14,fontWeight:500,pointerEvents:\"auto\"},tabIndex:0,\"aria-label\":\"External Link\",children:\"Visit Link\"})]});}return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",background,borderRadius,overflow:\"hidden\",position:\"relative\",pointerEvents:\"none\",userSelect:\"none\"},children:[src&&src.startsWith(\"https://vimeo.com/\")?/*#__PURE__*/_jsx(\"iframe\",{src:`https://player.vimeo.com/video/${src.split(\"/\").pop()}?autoplay=1&loop=1&muted=1&background=1`,width:\"100%\",height:\"100%\",frameBorder:\"0\",allow:\"autoplay; fullscreen; picture-in-picture\",style:{width:\"100%\",height:\"100%\",border:0,display:\"block\",pointerEvents:\"none\",userSelect:\"none\",background,borderRadius},tabIndex:-1,\"aria-hidden\":\"true\"}):/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:src,autoPlay:true,loop:true,muted:true,playsInline:true,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\",pointerEvents:\"none\",userSelect:\"none\"},tabIndex:-1,\"aria-hidden\":\"true\"}),enableExtras&&image?.src&&/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt||\"\",style:{position:\"absolute\",bottom:16,left:16,width:48,height:48,borderRadius:8,objectFit:\"cover\",boxShadow:\"0 2px 8px rgba(0,0,0,0.12)\",pointerEvents:\"auto\",background:\"#fff\"}}),enableExtras&&url&&/*#__PURE__*/_jsx(\"a\",{href:url,target:\"_blank\",rel:\"noopener noreferrer\",style:{position:\"absolute\",bottom:16,right:16,background:\"rgba(0,0,0,0.7)\",color:\"#fff\",padding:\"8px 16px\",borderRadius:6,textDecoration:\"none\",fontSize:14,fontWeight:500,pointerEvents:\"auto\"},tabIndex:0,\"aria-label\":\"External Link\",children:\"Visit Link\"})]});}addPropertyControls(LoopVideoPlayer,{videoFile:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},videoLink:{type:ControlType.String,title:\"Video Link\",defaultValue:\"\",placeholder:\"https://...\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:64},enableExtras:{type:ControlType.Boolean,title:\"Show Image & URL\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:({enableExtras})=>!enableExtras},url:{type:ControlType.String,title:\"URL\",defaultValue:\"\",placeholder:\"https://...\",hidden:({enableExtras})=>!enableExtras}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoopVideoPlayer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"480\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"270\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoopVideoPlayer.map"],"mappings":"mLASG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,YAAU,uEAAuE,YAAU,aAAW,eAAa,eAAa,GAAM,QAAM,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,CAAC,MAAI,GAAG,SAAO,EAAY,EAASA,EAAO,KAAK,CAAO,EAAI,GAAoB,EACmY,OADzX,MAAc,CAAI,EAAS,SAAS,EAAS,QAAQ,MAAM,CAAC,UAAU,GAAG,EAAI,CAAC,EAAI,CAAC,CAChd,GAAc,GAAO,KAAK,CAAC,GAAW,CAAC,EAA+B,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,aAAW,eAAa,SAAS,SAAS,SAAS,WAAW,cAAc,OAAO,WAAW,OAAO,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,IAAI,EAAM,IAAI,IAAI,EAAM,KAAK,GAAG,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,eAAa,QAAQ,QAAQ,cAAc,OAAO,WAAW,OAAO,CAAC,CAAC,CAAC,GAAkB,EAAK,IAAI,CAAC,KAAK,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