{"version":3,"file":"CleanVideo.CF-KUpLb.mjs","names":["useRef","useState","startTransition"],"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":"uPAOG,SAAS,EAAW,EAAM,CAAC,GAAK,CAAC,aAAW,OAAO,MAAI,uEAAuE,WAAS,GAAG,WAAS,GAAK,OAAK,GAAK,QAAM,G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