{"version":3,"file":"CleanVideo.DEP7YNly.mjs","names":["useRef","useState","startTransition","__esmMin","te","init_npm_react_18_3_1","_e","de","init_jsx_runtime","c","p","ce","useInView","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_B1b760uK","ControlType","CleanVideo","props","videoRef","containerRef","isInView","isHovered","setIsHovered","isPlaying","setIsPlaying","autoPlay","currentTime","setCurrentTime","duration","setDuration","isMuted","setIsMuted","muted","videoSource","sourceType","videoUrl","src","enableInView","video","updateTime","updateDuration","togglePlayPause","handleSliderChange","newTime","toggleMute","newMutedState","backgroundColor","enablePoster","poster","showSpeakerIcon","init_CleanVideo"],"sources":["https:/framerusercontent.com/modules/D8DF7Wls15wxa4d1CYyX/YHawC5PmZd0oxj23XL3z/CleanVideo.js"],"sourcesContent":["// Clean video player component with optimized performance and no controls\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useInView}from\"framer-motion\";/**\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 360\n * \n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */function CleanVideo(props){const{sourceType=\"file\",src=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoUrl=\"\",autoPlay=true,loop=true,muted=true,objectFit=\"cover\",backgroundColor=\"#FFFFFF\",borderRadius=0,enableInView=true,showSpeakerIcon=true,enablePoster=false,poster={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Video poster\"}}=props;const videoRef=useRef(null);const containerRef=useRef(null);const isInView=useInView(containerRef,{amount:.5});const[isHovered,setIsHovered]=useState(false);const[isPlaying,setIsPlaying]=useState(autoPlay);const[currentTime,setCurrentTime]=useState(0);const[duration,setDuration]=useState(0);const[isMuted,setIsMuted]=useState(muted);const videoSource=sourceType===\"url\"?videoUrl:src;// Handle autoplay when video enters/leaves viewport\nuseEffect(()=>{if(!videoRef.current)return;if(enableInView){if(isInView&&autoPlay){videoRef.current.play().catch(()=>{// Silently handle autoplay failures\n});startTransition(()=>setIsPlaying(true));}else if(!isInView){videoRef.current.pause();startTransition(()=>setIsPlaying(false));}}else if(autoPlay){videoRef.current.play().catch(()=>{// Silently handle autoplay failures\n});startTransition(()=>setIsPlaying(true));}},[isInView,autoPlay,enableInView]);useEffect(()=>{const video=videoRef.current;if(!video)return;const updateTime=()=>{startTransition(()=>{setCurrentTime(video.currentTime);});};const updateDuration=()=>{startTransition(()=>{setDuration(video.duration);});};video.addEventListener(\"timeupdate\",updateTime);video.addEventListener(\"loadedmetadata\",updateDuration);return()=>{video.removeEventListener(\"timeupdate\",updateTime);video.removeEventListener(\"loadedmetadata\",updateDuration);};},[]);const togglePlayPause=()=>{if(videoRef.current){if(isPlaying){videoRef.current.pause();startTransition(()=>setIsPlaying(false));}else{videoRef.current.play();startTransition(()=>setIsPlaying(true));}}};const handleSliderChange=e=>{const newTime=parseFloat(e.target.value);if(videoRef.current){videoRef.current.currentTime=newTime;startTransition(()=>setCurrentTime(newTime));}};const toggleMute=()=>{if(videoRef.current){const newMutedState=!isMuted;videoRef.current.muted=newMutedState;startTransition(()=>setIsMuted(newMutedState));}};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",border:\"none\",background:backgroundColor,borderRadius:borderRadius,WebkitBackfaceVisibility:\"hidden\",backfaceVisibility:\"hidden\",transform:\"translateZ(0)\"},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .video-slider::-webkit-slider-thumb {\n                        -webkit-appearance: none;\n                        appearance: none;\n                        width: 14px;\n                        height: 14px;\n                        border-radius: 50%;\n                        background: white;\n                        cursor: pointer;\n                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n                    }\n                    \n                    .video-slider::-moz-range-thumb {\n                        width: 14px;\n                        height: 14px;\n                        border-radius: 50%;\n                        background: white;\n                        cursor: pointer;\n                        border: none;\n                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n                    }\n                `}),/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:videoSource,poster:enablePoster?poster.src:undefined,autoPlay:autoPlay,loop:loop,muted:isMuted,playsInline:true,style:{display:\"block\",width:\"100%\",height:\"100%\",objectFit:objectFit,border:\"none\",outline:\"none\",boxShadow:\"none\"}}),showSpeakerIcon&&/*#__PURE__*/_jsx(\"button\",{onClick:toggleMute,style:{position:\"absolute\",top:\"20px\",right:\"20px\",background:\"rgba(255, 255, 255, 0.1)\",backdropFilter:\"blur(20px)\",WebkitBackdropFilter:\"blur(20px)\",boxShadow:\"inset 0 0 0 1000px rgba(0, 0, 0, 0.2)\",border:\"none\",borderRadius:\"50%\",width:\"40px\",height:\"40px\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:0,zIndex:10},\"aria-label\":isMuted?\"Unmute\":\"Mute\",children:isMuted?/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"white\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\"})}):/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"white\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z\"})})}),isHovered&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"20px\",left:\"50%\",transform:\"translateX(-50%)\",width:\"350px\",height:\"40px\",background:\"rgba(255, 255, 255, 0.1)\",borderRadius:\"8px\",display:\"flex\",alignItems:\"center\",padding:\"0 12px\",gap:\"12px\",backdropFilter:\"blur(20px)\",WebkitBackdropFilter:\"blur(20px)\",boxShadow:\"inset 0 0 0 1000px rgba(0, 0, 0, 0.2)\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:togglePlayPause,style:{background:\"transparent\",border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:0,width:\"24px\",height:\"24px\"},\"aria-label\":isPlaying?\"Pause\":\"Play\",children:isPlaying?/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"white\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"6\",y:\"5\",width:\"4\",height:\"14\",rx:\"1\"}),/*#__PURE__*/_jsx(\"rect\",{x:\"14\",y:\"5\",width:\"4\",height:\"14\",rx:\"1\"})]}):/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"white\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M8 5v14l11-7z\"})})}),/*#__PURE__*/_jsx(\"input\",{type:\"range\",min:\"0\",max:duration||0,value:currentTime,onChange:handleSliderChange,className:\"video-slider\",style:{flex:1,height:\"4px\",background:`linear-gradient(to right, white ${currentTime/duration*100}%, rgba(255, 255, 255, 0.3) ${currentTime/duration*100}%)`,borderRadius:\"2px\",outline:\"none\",cursor:\"pointer\",WebkitAppearance:\"none\",appearance:\"none\"}})]})]});}export default CleanVideo;addPropertyControls(CleanVideo,{sourceType:{type:ControlType.Enum,title:\"Source Type\",options:[\"file\",\"url\"],optionTitles:[\"File\",\"URL\"],defaultValue:\"file\",displaySegmentedControl:true},src:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],title:\"Video Source\",hidden:({sourceType})=>sourceType===\"url\"},videoUrl:{type:ControlType.String,title:\"Video URL\",placeholder:\"https://example.com/video.mp4\",defaultValue:\"\",hidden:({sourceType})=>sourceType===\"file\"},enablePoster:{type:ControlType.Boolean,title:\"Enable Poster\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},poster:{type:ControlType.ResponsiveImage,title:\"Poster Image\",hidden:({enablePoster})=>!enablePoster},enableInView:{type:ControlType.Boolean,title:\"Enable In View\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},autoPlay:{type:ControlType.Boolean,title:\"Auto Play\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},objectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"cover\",\"contain\",\"fill\",\"scale-down\",\"none\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\",\"Scale Down\",\"None\"],defaultValue:\"cover\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},showSpeakerIcon:{type:ControlType.Boolean,title:\"Show Speaker Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CleanVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"360\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"640\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CleanVideo.map"],"mappings":"A,uPAOG,SAASiB,EAAW,EAAM,CAAC,GAAK,CAAC,aAAW,OAAO,MAAI,uEAAuE,WAAS,GAAG,WAAS,GAAK,OAAK,GAAK,QAAM,GAAK,YAAU,QAAQ,kBAAgB,UAAU,eAAa,EAAE,eAAa,GAAK,kBAAgB,GAAK,eAAa,GAAM,SAAO,CAAC,IAAI,sEAAsE,IAAI,cAAc,GAAGC,EAAYC,EAASnB,EAAO,IAAI,EAAQoB,EAAapB,EAAO,IAAI,EAAQqB,EAAST,EAAUQ,EAAa,CAAC,OAAO,EAAE,CAAC,EAAO,CAACE,EAAUC,GAActB,EAAS,EAAK,EAAO,CAACuB,EAAUC,GAAcxB,EAASyB,CAAQ,EAAO,CAACC,EAAYC,GAAgB3B,EAAS,CAAC,EAAO,CAAC4B,EAASC,GAAa7B,EAAS,CAAC,EAAO,CAAC8B,EAAQC,GAAY/B,EAASgC,CAAK,EAAQC,EAAYC,IAAa,MAAMC,EAASC,EAC9wB1B,MAAc,CAAKQ,EAAS,UAAkBmB,EAAiBjB,GAAUK,GAAUP,EAAS,QAAQ,KAAK,CAAC,CAAC,UAAU,CACrH,CAAC,EAAEf,MAAoBqB,EAAa,EAAI,CAAC,GAAYJ,IAAUF,EAAS,QAAQ,MAAM,EAAEf,MAAoBqB,EAAa,EAAK,CAAC,GAAYC,IAAUP,EAAS,QAAQ,KAAK,CAAC,CAAC,UAAU,CACvL,CAAC,EAAEf,MAAoBqB,EAAa,EAAI,CAAC,GAAG,EAAE,CAACJ,EAASK,EAASY,CAAY,CAAC,EAAE3B,MAAc,CAAC,IAAM4B,EAAMpB,EAAS,QAAQ,GA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