{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/6BX9ZibWvPNP8B3q1XOy/roTYvJQrLx2BuRFzpW1Z/Muted_Video_Player_No_Lightbox.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Constants for customization\nconst imageHoverOverlay=\"rgba(12, 12, 12, 0.95)\";const overlayButtonBackground=\"#4D4D4D\";const overlayButtonHoverBackground=\"#707070\";// Lazy loading utility\nconst useLazyLoad=()=>{const[isInView,setIsInView]=useState(false);const elementRef=useRef(null);useEffect(()=>{const handleIntersection=entries=>{const entry=entries[0];if(entry.isIntersecting){setIsInView(true);}else{setIsInView(false);}};const observer=new IntersectionObserver(handleIntersection,{rootMargin:\"100px\"});if(elementRef.current)observer.observe(elementRef.current);return()=>{if(elementRef.current)observer.unobserve(elementRef.current);};},[]);return{isInView,elementRef};};export default function AdvancedVideoPlayerNoLB(props){const{videoUrl,poster,background,radius,startTime,loop:initialLoop,muted,autoplay,controls,fit,videoTitle,videoDescription,uploadDate,style}=props;const[currentVideoUrl,setCurrentVideoUrl]=useState(null);const[videoError,setVideoError]=useState(false);const[loop,setLoop]=useState(initialLoop);const{isInView,elementRef}=useLazyLoad();const isFramerCanvas=RenderTarget.current()===RenderTarget.canvas;// Ref for the video element\nconst videoRef=useRef(null);// Handle video loading errors\nconst handleVideoError=()=>{setVideoError(true);};// Only load the video URL if the element is in view AND autoplay is enabled.\nuseEffect(()=>{if(isInView&&autoplay){setCurrentVideoUrl(videoUrl);}else{setCurrentVideoUrl(null);}},[isInView,videoUrl,autoplay]);// Pause video if autoplay is false (and the video is playing)\nuseEffect(()=>{if(videoRef.current&&!autoplay){videoRef.current.pause();}},[autoplay]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",cursor:\"default\",userSelect:\"none\"},ref:elementRef,children:isFramerCanvas?/*#__PURE__*/_jsx(\"img\",{src:poster,alt:`Poster for ${videoTitle}`,style:{width:\"100%\",height:\"100%\",objectFit:fit,borderRadius:radius}}):currentVideoUrl&&isInView&&!videoError?/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:currentVideoUrl,autoPlay:autoplay,muted:muted,loop:loop,playsInline:true,onError:handleVideoError,style:{width:\"100%\",height:\"100%\",objectFit:fit,borderRadius:radius,display:\"block\"},\"aria-labelledby\":\"videoTitle videoDescription\"}):/*#__PURE__*/_jsx(\"img\",{src:poster,alt:`Poster for ${videoTitle}`,style:{width:\"100%\",height:\"100%\",objectFit:fit,borderRadius:radius}})});}AdvancedVideoPlayerNoLB.defaultProps={videoUrl:\"\",poster:\"\",background:\"transparent\",radius:16,startTime:0,loop:false,muted:true,autoplay:false,controls:false,fit:\"cover\",videoTitle:\"My Video Title\",videoDescription:\"A description of the video.\",uploadDate:\"2021-01-01\",style:{}};addPropertyControls(AdvancedVideoPlayerNoLB,{videoUrl:{type:ControlType.String,title:\"Video URL\"},poster:{type:ControlType.File,title:\"Poster\",allowedFileTypes:[\"image/*\"]},background:{type:ControlType.Color,title:\"Background\"},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:100,unit:\"px\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"fill\",\"contain\",\"cover\"]},controls:{type:ControlType.Boolean,title:\"Controls\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\"},loop:{type:ControlType.Boolean,title:\"Loop\"},videoTitle:{type:ControlType.String,title:\"Video Title\"},videoDescription:{type:ControlType.String,title:\"Video Description\",displayTextArea:true},uploadDate:{type:ControlType.String,title:\"Upload Date\",description:\"ISO 8601 format (YYYY-MM-DD)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AdvancedVideoPlayerNoLB\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Muted_Video_Player_No_Lightbox.map"],
  "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MAAM,MAAM,QAAQ,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,UAAU,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,UAAU,EAAE,KAAK,CAAC,KAAKA,EAAY,QAAQ,MAAM,MAAM,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,KAAKA,EAAY,OAAO,MAAM,oBAAoB,gBAAgB,EAAI,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,cAAc,YAAY,8BAA8B,CAAC,CAAC",
  "names": ["useLazyLoad", "isInView", "setIsInView", "ye", "elementRef", "pe", "ue", "handleIntersection", "entries", "observer", "AdvancedVideoPlayerNoLB", "props", "videoUrl", "poster", "background", "radius", "startTime", "initialLoop", "muted", "autoplay", "controls", "fit", "videoTitle", "videoDescription", "uploadDate", "style", "currentVideoUrl", "setCurrentVideoUrl", "videoError", "setVideoError", "loop", "setLoop", "isFramerCanvas", "RenderTarget", "videoRef", "handleVideoError", "p", "addPropertyControls", "ControlType"]
}
