module.exports=[944795,(a,b,c)=>{let d,e,f;var g=Object.create,h=Object.defineProperty,i=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,m=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let e of j(b))l.call(a,e)||e===c||h(a,e,{get:()=>b[e],enumerable:!(d=i(b,e))||d.enumerable});return a},n=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?h(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c,c},o={},p={default:()=>t};for(var q in p)h(o,q,{get:p[q],enumerable:!0});b.exports=m(h({},"__esModule",{value:!0}),o);var r=(f=null!=(d=a.r(572131))?g(k(d)):{},m(!e&&d&&d.__esModule?f:h(f,"default",{value:d,enumerable:!0}),d)),s=a.r(441795);class t extends r.Component{constructor(){super(...arguments),n(this,"onReady",(...a)=>this.props.onReady(...a)),n(this,"onPlay",(...a)=>this.props.onPlay(...a)),n(this,"onBuffer",(...a)=>this.props.onBuffer(...a)),n(this,"onBufferEnd",(...a)=>this.props.onBufferEnd(...a)),n(this,"onPause",(...a)=>this.props.onPause(...a)),n(this,"onEnded",(...a)=>this.props.onEnded(...a)),n(this,"onError",(...a)=>this.props.onError(...a)),n(this,"onPlayBackRateChange",a=>this.props.onPlaybackRateChange(a.target.playbackRate)),n(this,"onEnablePIP",(...a)=>this.props.onEnablePIP(...a)),n(this,"onSeek",a=>{this.props.onSeek(a.target.currentTime)}),n(this,"onDurationChange",()=>{let a=this.getDuration();this.props.onDuration(a)}),n(this,"mute",()=>{this.player.muted=!0}),n(this,"unmute",()=>{this.player.muted=!1}),n(this,"ref",a=>{this.player=a})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);let a=this.getPlaybackId(this.props.url);a&&(this.player.playbackId=a)}componentWillUnmount(){this.player.playbackId=null,this.removeListeners(this.player)}addListeners(a){let{playsinline:b}=this.props;a.addEventListener("play",this.onPlay),a.addEventListener("waiting",this.onBuffer),a.addEventListener("playing",this.onBufferEnd),a.addEventListener("pause",this.onPause),a.addEventListener("seeked",this.onSeek),a.addEventListener("ended",this.onEnded),a.addEventListener("error",this.onError),a.addEventListener("ratechange",this.onPlayBackRateChange),a.addEventListener("enterpictureinpicture",this.onEnablePIP),a.addEventListener("leavepictureinpicture",this.onDisablePIP),a.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),a.addEventListener("canplay",this.onReady),b&&a.setAttribute("playsinline","")}removeListeners(a){a.removeEventListener("canplay",this.onReady),a.removeEventListener("play",this.onPlay),a.removeEventListener("waiting",this.onBuffer),a.removeEventListener("playing",this.onBufferEnd),a.removeEventListener("pause",this.onPause),a.removeEventListener("seeked",this.onSeek),a.removeEventListener("ended",this.onEnded),a.removeEventListener("error",this.onError),a.removeEventListener("ratechange",this.onPlayBackRateChange),a.removeEventListener("enterpictureinpicture",this.onEnablePIP),a.removeEventListener("leavepictureinpicture",this.onDisablePIP),a.removeEventListener("canplay",this.onReady)}async load(a){var b;let{onError:c,config:d}=this.props;if(!(null==(b=globalThis.customElements)?void 0:b.get("mux-player")))try{let a="https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs".replace("VERSION",d.version);await import(`${a}`),this.props.onLoaded()}catch(a){c(a)}let[,e]=a.match(s.MATCH_URL_MUX);this.player.playbackId=e}play(){let a=this.player.play();a&&a.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.playbackId=null}seekTo(a,b=!0){this.player.currentTime=a,b||this.pause()}setVolume(a){this.player.volume=a}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player&&this.player.requestPictureInPicture()}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player&&document.exitPictureInPicture()}setPlaybackRate(a){try{this.player.playbackRate=a}catch(a){this.props.onError(a)}}getDuration(){if(!this.player)return null;let{duration:a,seekable:b}=this.player;return a===1/0&&b.length>0?b.end(b.length-1):a}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;let{buffered:a}=this.player;if(0===a.length)return 0;let b=a.end(a.length-1),c=this.getDuration();return b>c?c:b}getPlaybackId(a){let[,b]=a.match(s.MATCH_URL_MUX);return b}render(){let{url:a,playing:b,loop:c,controls:d,muted:e,config:f,width:g,height:h}=this.props,i={width:"auto"===g?g:"100%",height:"auto"===h?h:"100%"};return!1===d&&(i["--controls"]="none"),r.default.createElement("mux-player",{ref:this.ref,"playback-id":this.getPlaybackId(a),style:i,preload:"auto",autoPlay:b||void 0,muted:e?"":void 0,loop:c?"":void 0,...f.attributes})}}n(t,"displayName","Mux"),n(t,"canPlay",s.canPlay.mux)}];

//# sourceMappingURL=node_modules_react-player_lazy_players_Mux_10be06ec.js.map