{"version":3,"file":"MuxPlayer.DdyqTv3p.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/jbQYkbgn4sHXRWs09K2B/Y6aneZ0JQgBgkn2FHvuT/MuxPlayer.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function MuxPlayer({playbackId=\"lLE9KBypj81016bxSIW6gm34cdDRWmEFfKYRWhij7iZ4\",poster=\"https://res.cloudinary.com/mxu/image/upload/c_scale,f_auto,q_auto:good,w_1920/marketing_homepage/coaching_lander_thumb_x6wjkn\",accentColor=\"#fff700\",borderRadius=48,maxWidth=1e3,borderColor=\"rgba(140,175,241,0.15)\",style}){const containerRef=useRef(null);const[scriptLoaded,setScriptLoaded]=useState(false);useEffect(()=>{if(document.querySelector('script[src*=\"mux-player\"]')){setScriptLoaded(true);return;}const script=document.createElement(\"script\");script.src=\"https://cdn.jsdelivr.net/npm/@mux/mux-player@3/dist/mux-player.js\";script.async=true;script.onload=()=>setScriptLoaded(true);document.head.appendChild(script);},[]);useEffect(()=>{if(!containerRef.current||!scriptLoaded)return;const el=containerRef.current;el.innerHTML=\"\";const player=document.createElement(\"mux-player\");player.setAttribute(\"playback-id\",playbackId);player.setAttribute(\"metadata-video-title\",\"MxU Video\");player.setAttribute(\"accent-color\",accentColor);player.setAttribute(\"poster\",poster);player.setAttribute(\"stream-type\",\"on-demand\");player.setAttribute(\"preload\",\"none\");player.style.width=\"100%\";player.style.aspectRatio=\"16/9\";player.style.display=\"block\";player.style.borderRadius=\"0\";el.appendChild(player);},[playbackId,poster,accentColor,scriptLoaded]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",maxWidth:maxWidth,margin:\"0 auto\",...style},children:/*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",aspectRatio:\"16/9\",backgroundColor:\"#000\",borderRadius:borderRadius,overflow:\"hidden\",border:`1px solid ${borderColor}`}})});}addPropertyControls(MuxPlayer,{playbackId:{type:ControlType.String,title:\"Playback ID\",defaultValue:\"lLE9KBypj81016bxSIW6gm34cdDRWmEFfKYRWhij7iZ4\"},poster:{type:ControlType.String,title:\"Poster URL\",defaultValue:\"https://res.cloudinary.com/mxu/image/upload/c_scale,f_auto,q_auto:good,w_1920/marketing_homepage/coaching_lander_thumb_x6wjkn\"},accentColor:{type:ControlType.Color,title:\"Accent Color\",defaultValue:\"#fff700\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:48,min:0,max:96,step:1},maxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:1e3,min:300,max:1440,step:10},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"rgba(140,175,241,0.15)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MuxPlayer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MuxPlayer.map"],"mappings":"wLAA4I,SAAwB,EAAU,CAAC,aAAW,+CAA+C,SAAO,gIAAgI,cAAY,UAAU,eAAa,GAAG,WAAS,IAAI,cAAY,yBAAyB,SAAO,CAAC,IAAM,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAa,GAAiBC,EAAS,GAAM,CAA+6B,OAA96B,MAAc,CAAC,GAAG,SAAS,cAAc,4BAA4B,CAAC,CAAC,EAAgB,GAAK,CAAC,OAAQ,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,oEAAoE,EAAO,MAAM,GAAK,EAAO,WAAW,EAAgB,GAAK,CAAC,SAAS,KAAK,YAAY,EAAO,EAAG,EAAE,CAAC,CAAC,MAAc,CAAC,GAAG,CAAC,EAAa,SAAS,CAAC,EAAa,OAAO,IAAM,EAAG,EAAa,QAAQ,EAAG,UAAU,GAAG,IAAM,EAAO,SAAS,cAAc,aAAa,CAAC,EAAO,aAAa,cAAc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