module.exports=[12314,(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:()=>u};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(187287),t=a.r(441795);class u extends r.Component{constructor(){super(...arguments),n(this,"callPlayer",s.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"fractionLoaded",null),n(this,"mute",()=>{this.setVolume(0)}),n(this,"unmute",()=>{null!==this.props.volume&&this.setVolume(this.props.volume)}),n(this,"ref",a=>{this.iframe=a})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(a,b){(0,s.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(c=>{if(!this.iframe)return;let{PLAY:d,PLAY_PROGRESS:e,PAUSE:f,FINISH:g,ERROR:h}=c.Widget.Events;b||(this.player=c.Widget(this.iframe),this.player.bind(d,this.props.onPlay),this.player.bind(f,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(e,a=>{this.currentTime=a.currentPosition/1e3,this.fractionLoaded=a.loadedProgress}),this.player.bind(g,()=>this.props.onEnded()),this.player.bind(h,a=>this.props.onError(a))),this.player.load(a,{...this.props.config.options,callback:()=>{this.player.getDuration(a=>{this.duration=a/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(a,b=!0){this.callPlayer("seekTo",1e3*a),b||this.pause()}setVolume(a){this.callPlayer("setVolume",100*a)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){let{display:a}=this.props;return r.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:{width:"100%",height:"100%",display:a},frameBorder:0,allow:"autoplay"})}}n(u,"displayName","SoundCloud"),n(u,"canPlay",t.canPlay.soundcloud),n(u,"loopOnEnded",!0)}];

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