(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7570],{63116:(e,t,r)=>{let s,o,l;var a=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,d=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of p(t))h.call(e,o)||o===r||n(e,o,{get:()=>t[o],enumerable:!(s=i(t,o))||s.enumerable});return e},c=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?n(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r,r},y={},m={default:()=>w};for(var f in m)n(y,f,{get:m[f],enumerable:!0});e.exports=d(n({},"__esModule",{value:!0}),y);var b=(l=null!=(s=r(50245))?a(u(s)):{},d(!o&&s&&s.__esModule?l:n(l,"default",{value:s,enumerable:!0}),s)),g=r(90533),P=r(60595);class w extends b.Component{constructor(){super(...arguments),c(this,"callPlayer",g.callPlayer),c(this,"duration",null),c(this,"currentTime",null),c(this,"secondsLoaded",null),c(this,"mute",()=>{}),c(this,"unmute",()=>{}),c(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,g.getSDK)("https://widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then(e=>{this.player=e.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((e,t)=>{this.currentTime=e,this.duration=t}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){let{url:e,config:t}=this.props,r=e.match(P.MATCH_URL_MIXCLOUD)[1],s=(0,g.queryString)({...t.options,feed:`/${r}/`});return b.default.createElement("iframe",{key:r,ref:this.ref,style:{width:"100%",height:"100%"},src:`https://www.mixcloud.com/widget/iframe/?${s}`,frameBorder:"0",allow:"autoplay"})}}c(w,"displayName","Mixcloud"),c(w,"canPlay",P.canPlay.mixcloud),c(w,"loopOnEnded",!0)}}]);