{"version":3,"file":"VideoPlayer.C50kKoue.mjs","names":["useState","useRef","startTransition"],"sources":["https:/framerusercontent.com/modules/tm072BMfU1mtXhSa7jcE/XZAfSkymjxKIiPQhn4Uo/VideoPlayer.js"],"sourcesContent":["// Video component with all native Framer video controls, plus a poster URL field\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Video with Poster URL\n *\n * @framerIntrinsicWidth 480\n * @framerIntrinsicHeight 270\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function VideoPlayer(props){const{video=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoUrl,poster=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",autoplay,loop,muted,controls,playsInline,preload,showOnHover,objectFit,background,borderRadius,shadow,style}=props;const[hovered,setHovered]=useState(false);const isStatic=useIsStaticRenderer();const videoRef=useRef(null);useEffect(()=>{if(!showOnHover||!videoRef.current)return;if(hovered){videoRef.current.play();}else{videoRef.current.pause();}},[hovered,showOnHover]);// Pause video in static renderer\nuseEffect(()=>{if(isStatic&&videoRef.current){videoRef.current.pause();}},[isStatic]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",background,borderRadius,boxShadow:shadow,overflow:\"hidden\",position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},onMouseEnter:()=>startTransition(()=>setHovered(true)),onMouseLeave:()=>startTransition(()=>setHovered(false)),children:/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:videoUrl&&videoUrl.length>0?videoUrl:video,poster:poster,autoPlay:autoplay&&!showOnHover,loop:loop,muted:muted,controls:controls,playsInline:playsInline,preload:preload,style:{width:\"100%\",height:\"100%\",objectFit:objectFit,display:\"block\",borderRadius,background},tabIndex:0,\"aria-label\":\"Video player\"})});}addPropertyControls(VideoPlayer,{video:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",placeholder:\"https://...\"},poster:{type:ControlType.String,title:\"Poster URL\",defaultValue:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",placeholder:\"https://...\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:false},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:false},controls:{type:ControlType.Boolean,title:\"Show Controls\",defaultValue:true},playsInline:{type:ControlType.Boolean,title:\"Plays Inline\",defaultValue:true},preload:{type:ControlType.Enum,title:\"Preload\",options:[\"auto\",\"metadata\",\"none\"],optionTitles:[\"Auto\",\"Metadata\",\"None\"],defaultValue:\"auto\"},showOnHover:{type:ControlType.Boolean,title:\"Play on Hover\",defaultValue:false},objectFit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Cover (Crop)\",\"Contain (Letterbox)\",\"Fill\",\"None\",\"Scale-down\"],defaultValue:\"cover\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"8px\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoPlayer\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"270\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"480\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoP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