{"version":3,"file":"VideoComponent.BdBw4HUI.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/Ej1n1XJTy22GBvs0w0ly/OTThD3QHYV92xhkXogtV/VideoComponent.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function VideoPlayer({videoFile,posterImage,loop,cornerRadius,ClientName,SiteName,InfoDivLeft,InfoDivRight,InfoDivBottom,NameFontSize,NameLetterSpacing,SiteFontSize,SiteLetterSpacing,videoLabel,playButtonLabel,infoRegionLabel}){const videoRef=useRef(null);const[isPlaying,setIsPlaying]=useState(false);const handlePlay=()=>{if(!videoRef.current)return;setIsPlaying(true);videoRef.current.play();};const containerStyle={position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:cornerRadius};const videoStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"};const overlayStyle={position:\"absolute\",top:0,left:0,bottom:0,right:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"rgba(0,0,0,0.4)\",transition:\"background-color 0.2s ease\",borderRadius:cornerRadius};const iconStyle={width:64,height:64,fill:\"white\",filter:\"drop-shadow(0 2px 4px rgba(0,0,0,0.25))\",cursor:\"pointer\",zIndex:9};const infoDivStyle={position:\"absolute\",left:`${InfoDivLeft}px`,right:`${InfoDivRight}px`,bottom:`${InfoDivBottom}px`,width:\"auto\",display:\"flex\",flexDirection:\"column\",gap:\"4px\",zIndex:9};const NameTag={fontFamily:\"Inter\",fontSize:`${NameFontSize}px`,fontWeight:\"500\",letterSpacing:`${NameLetterSpacing}px`,lineHeight:\"1.2em\",color:\"#FFF\",margin:\"0\",width:\"fit-content\"};const SiteTag={fontFamily:\"Inter\",fontSize:`${SiteFontSize}px`,fontWeight:\"400\",letterSpacing:`${SiteLetterSpacing}px`,lineHeight:\"1.2em\",color:\"rgba(255,255,255,0.6)\",height:\"fit-content\",margin:\"0\",width:\"fit-content\",textDecoration:\"none\"};const formattedSiteURL=SiteName?.startsWith(\"http\")?SiteName:`https://${SiteName}`;return /*#__PURE__*/_jsxs(\"section\",{style:containerStyle,\"aria-label\":videoLabel||\"Video section\",children:[/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:videoFile,poster:posterImage,loop:loop,muted:!isPlaying,playsInline:true,style:videoStyle,controls:isPlaying,controlsList:\"nodownload\",\"aria-label\":videoLabel||\"Video content\",children:/*#__PURE__*/_jsx(\"track\",{kind:\"captions\"})}),!isPlaying&&/*#__PURE__*/_jsxs(\"div\",{style:overlayStyle,onClick:handlePlay,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \")handlePlay();},role:\"button\",tabIndex:0,\"aria-label\":playButtonLabel||\"Play video\",children:[/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",style:iconStyle,focusable:\"false\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M8 5v14l11-7z\"})}),/*#__PURE__*/_jsxs(\"div\",{style:infoDivStyle,onClick:e=>e.stopPropagation(),\"aria-label\":infoRegionLabel||\"Client and site information\",children:[/*#__PURE__*/_jsx(\"p\",{style:NameTag,children:ClientName}),/*#__PURE__*/_jsx(\"a\",{href:formattedSiteURL,style:SiteTag,target:\"_blank\",rel:\"noopener noreferrer\",\"aria-label\":`Visit ${ClientName}'s website`,children:SiteName})]})]})]});}// ──────────────────────────────────────────────────────────────────────────\n// Property Controls\n// ──────────────────────────────────────────────────────────────────────────\nVideoPlayer.defaultProps={videoFile:\"\",posterImage:\"\",loop:false,cornerRadius:16};addPropertyControls(VideoPlayer,{videoFile:{type:ControlType.File,title:\"Video File\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},posterImage:{type:ControlType.Image,title:\"Poster Image\",description:\"Image shown before video plays or when paused\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",min:0,max:100,step:1,defaultValue:16},ClientName:{type:ControlType.String,title:\"Client Name\",placeholder:\"John Doe\"},NameFontSize:{type:ControlType.Number,title:\"Name Font Size\",min:8,step:1,defaultValue:16},NameLetterSpacing:{type:ControlType.Number,title:\"Name Letter Spacing\",defaultValue:0},SiteName:{type:ControlType.String,title:\"Site URL\",placeholder:\"https://siteurl.com\"},SiteFontSize:{type:ControlType.Number,title:\"URL Font Size\",min:8,step:1,defaultValue:16},SiteLetterSpacing:{type:ControlType.Number,title:\"URL Letter Spacing\",defaultValue:0},InfoDivLeft:{type:ControlType.Number,title:\"Info left position\",defaultValue:32},InfoDivRight:{type:ControlType.Number,title:\"Info right position\",defaultValue:32},InfoDivBottom:{type:ControlType.Number,title:\"Info bottom position\",defaultValue:32},videoLabel:{type:ControlType.String,title:\"Video Label\",defaultValue:\"Video section\",description:\"Accessibility label for the video container\"},playButtonLabel:{type:ControlType.String,title:\"Play Button Label\",defaultValue:\"Play video\",description:\"Accessibility label for the play button\"},infoRegionLabel:{type:ControlType.String,title:\"Info Region Label\",defaultValue:\"Client and site information\",description:\"Accessibility label for the info text area\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoPlayer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoComponent.map"],"mappings":"wLAAgJ,SAAwB,EAAY,CAAC,YAAU,cAAY,OAAK,eAAa,aAAW,WAAS,cAAY,eAAa,gBAAc,eAAa,oBAAkB,eAAa,oBAAkB,aAAW,kBAAgB,mBAAiB,CAAC,IAAM,EAASA,EAAO,KAAK,CAAM,CAAC,EAAU,GAAcC,EAAS,GAAM,CAAO,MAAe,CAAK,EAAS,UAAe,EAAa,GAAK,CAAC,EAAS,QAAQ,MAAM,GAAS,EAAe,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,aAAa,EAAa,CAA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