module.exports=[11298,(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,"playerID",this.props.config.playerId||`twitch-player-${(0,s.randomString)()}`),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(a,b){let{playsinline:c,onError:d,config:e,controls:f}=this.props,g=t.MATCH_URL_TWITCH_CHANNEL.test(a),h=g?a.match(t.MATCH_URL_TWITCH_CHANNEL)[1]:a.match(t.MATCH_URL_TWITCH_VIDEO)[1];b?g?this.player.setChannel(h):this.player.setVideo("v"+h):(0,s.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then(b=>{this.player=new b.Player(this.playerID,{video:g?"":h,channel:g?h:"",height:"100%",width:"100%",playsinline:c,autoplay:this.props.playing,muted:this.props.muted,controls:!!g||f,time:(0,s.parseStartTime)(a),...e.options});let{READY:d,PLAYING:i,PAUSE:j,ENDED:k,ONLINE:l,OFFLINE:m,SEEK:n}=b.Player;this.player.addEventListener(d,this.props.onReady),this.player.addEventListener(i,this.props.onPlay),this.player.addEventListener(j,this.props.onPause),this.player.addEventListener(k,this.props.onEnded),this.player.addEventListener(n,this.props.onSeek),this.player.addEventListener(l,this.props.onLoaded),this.player.addEventListener(m,this.props.onLoaded)},d)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(a,b=!0){this.callPlayer("seek",a),b||this.pause()}setVolume(a){this.callPlayer("setVolume",a)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){return r.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID})}}n(u,"displayName","Twitch"),n(u,"canPlay",t.canPlay.twitch),n(u,"loopOnEnded",!0)}];

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