{"version":3,"file":"iOS_Player.CtgXBdUt.mjs","names":["useState","useRef","_Fragment","startTransition"],"sources":["https:/framerusercontent.com/modules/Raqe4oKOTA8QheGW18ld/6CoDxUsoOzEeKwHuQUK8/iOS_Player.js"],"sourcesContent":["// iPhone mockup component with realistic body and video upload features, fully customizable\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useRef,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * iPhone Mockup with Video Upload\n * \n * A realistic iPhone mockup component with customizable video upload and playback features\n * \n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 600\n * \n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function IPhoneMockup(props){const{deviceColor=\"#1a1a1a\",screenBackgroundColor=\"#000000\",videoSourceType=\"file\",videoFile=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoUrl=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",posterImage={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Video poster\"},showControls=true,autoplay=false,loop=true,muted=true,borderRadius=45,screenPadding=8,notchColor=\"#000000\",showReflection=true,style}=props;const[isPlaying,setIsPlaying]=useState(autoplay);const videoRef=useRef(null);const handlePlayPause=()=>{if(videoRef.current){if(isPlaying){videoRef.current.pause();}else{videoRef.current.play();}startTransition(()=>setIsPlaying(!isPlaying));}};const deviceWidth=style?.width===\"100%\"?\"100%\":\"300px\";const deviceHeight=style?.height===\"100%\"?\"100%\":\"600px\";// Get the correct video source based on type\nconst videoSource=videoSourceType===\"file\"?videoFile:videoUrl;// Helper function to detect and convert Vimeo URLs\nconst getVimeoEmbedUrl=url=>{const vimeoRegex=/(?:vimeo\\.com\\/)(?:.*\\/)?(\\d+)/;const match=url.match(vimeoRegex);if(match&&match[1]){const videoId=match[1];const params=new URLSearchParams;if(autoplay)params.append(\"autoplay\",\"1\");if(loop)params.append(\"loop\",\"1\");if(muted)params.append(\"muted\",\"1\");params.append(\"controls\",showControls?\"1\":\"0\");return`https://player.vimeo.com/video/${videoId}?${params.toString()}`;}return null;};const isVimeo=videoSourceType===\"url\"&&getVimeoEmbedUrl(videoUrl)!==null;const vimeoEmbedUrl=isVimeo?getVimeoEmbedUrl(videoUrl):null;return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:deviceWidth,height:deviceHeight,display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:deviceColor,borderRadius:borderRadius,padding:`${screenPadding}px`,boxShadow:showReflection?`0 25px 50px rgba(0, 0, 0, 0.25), 0 12px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1)`:`0 8px 32px rgba(0, 0, 0, 0.3)`,position:\"relative\",display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:screenPadding+12,left:\"50%\",transform:\"translateX(-50%)\",width:\"120px\",height:\"30px\",backgroundColor:notchColor,borderRadius:\"15px\",zIndex:10}}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:screenBackgroundColor,borderRadius:borderRadius-screenPadding,overflow:\"hidden\",position:\"relative\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:isVimeo?/*#__PURE__*/_jsx(\"iframe\",{src:vimeoEmbedUrl||\"\",style:{width:\"100%\",height:\"100%\",border:\"none\",borderRadius:borderRadius-screenPadding-2},allow:\"autoplay; fullscreen; picture-in-picture\",allowFullScreen:true}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:videoSource,poster:posterImage.src,autoPlay:autoplay,loop:loop,muted:muted,controls:showControls,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:borderRadius-screenPadding-2},onPlay:()=>startTransition(()=>setIsPlaying(true)),onPause:()=>startTransition(()=>setIsPlaying(false))}),!showControls&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",cursor:\"pointer\",backgroundColor:\"rgba(0, 0, 0, 0.1)\",opacity:isPlaying?0:1,transition:\"opacity 0.3s ease\"},onClick:handlePlayPause,children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"60px\",height:\"60px\",borderRadius:\"50%\",backgroundColor:\"rgba(255, 255, 255, 0.8)\",backdropFilter:\"blur(10px)\",border:\"1px solid rgba(255, 255, 255, 0.3)\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0.4px rgba(255, 255, 255, 1)\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",style:{marginLeft:isPlaying?\"0\":\"2px\"},children:isPlaying?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"rect\",{x:\"6\",y:\"4\",width:\"4\",height:\"16\",fill:\"#000\"}),/*#__PURE__*/_jsx(\"rect\",{x:\"14\",y:\"4\",width:\"4\",height:\"16\",fill:\"#000\"})]}):/*#__PURE__*/_jsx(\"polygon\",{points:\"8,5 19,12 8,19\",fill:\"#000\"})})})})]})})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:screenPadding+8,left:\"50%\",transform:\"translateX(-50%)\",width:\"134px\",height:\"5px\",backgroundColor:\"rgba(255, 255, 255, 0.3)\",borderRadius:\"2.5px\"}})]})});}addPropertyControls(IPhoneMockup,{videoSourceType:{type:ControlType.Enum,title:\"Video Source\",options:[\"file\",\"url\"],optionTitles:[\"File\",\"URL\"],defaultValue:\"file\",displaySegmentedControl:true},videoFile:{type:ControlType.File,title:\"Video File\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\",\"avi\"],hidden:({videoSourceType})=>videoSourceType!==\"file\"},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",placeholder:\"Enter video URL...\",hidden:({videoSourceType})=>videoSourceType!==\"url\"},posterImage:{type:ControlType.ResponsiveImage,title:\"Image\",description:\"We recommend adding a poster image\"},deviceColor:{type:ControlType.Color,title:\"Device Color\",defaultValue:\"#1a1a1a\"},screenBackgroundColor:{type:ControlType.Color,title:\"Screen Background\",defaultValue:\"#000000\"},notchColor:{type:ControlType.Color,title:\"Notch Color\",defaultValue:\"#000000\"},showControls:{type:ControlType.Boolean,title:\"Controls\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop Video\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:45,min:20,max:60,step:1,unit:\"px\"},screenPadding:{type:ControlType.Number,title:\"Screen Padding\",defaultValue:8,min:4,max:20,step:1,unit:\"px\"},showReflection:{type:ControlType.Boolean,title:\"Reflection\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IPhoneMockup\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"fram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