(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1723:function(e,n,t){"use strict";t.r(n);var r=t(9),o=t.n(r),a=t(7),i=t.n(a),s=(t(4),t(1)),u=t.n(s),c=t(1603),l=t(17);var d,f=function(e){var n=!1;return function(){if(!n)return n=!0,e.apply(void 0,arguments)}}(function(){c.polyfill.installAll()}),p=t(2),h=t(10),m=t.n(h),g=u.a.createElement,y=function(e){function n(){for(var n,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(n=e.call.apply(e,[this].concat(r))||this).onTimeout=function(){var e=n.props,t=e.positionSeconds,r=e.durationSeconds,o=e.onEnd,a=r-t;l.a.warn("[Player] Manually ending while stalled within the last %ss.",a),n.props.onBufferingChange&&n.props.onBufferingChange(!1),o()},n}i()(n,e);var t=n.prototype;return t.componentDidUpdate=function(e){var n=this.props,t=n.healthCheckSecondsFromEnd,r=n.positionSeconds,o=n.durationSeconds,a=n.paused,i=n.onEnd,s=!1;i&&o>0&&r>=o&&(s=!0,i());var u=r!==e.positionSeconds,c=a&&a!==e.paused,l=s||u||c;this._timeoutID&&l&&clearTimeout(this._timeoutID);var d=o-r;if(o>0&&i&&(!s&&!a)&&d>=0&&d<t){var f=Math.round(1e3*d)+250;clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this.onTimeout,f)}},t.componentWillUnmount=function(){this._timeoutID&&clearTimeout(this._timeoutID)},t.render=function(){var e=this.props,n=e.mediaComponent,t=m()(e,["mediaComponent"]);return g(n,t)},n}(u.a.Component),E=t(431),v=u.a.createElement,w=u.a.Component,b=1,C=2;function S(e){switch(e){case 1:return Object(p.default)("Network");case 2:return Object(p.default)("Text");case 3:return Object(p.default)("Media");case 4:return Object(p.default)("Manifest");case 5:return Object(p.default)("Streaming");case 6:return Object(p.default)("DRM");case 7:return Object(p.default)("Player");case 8:return Object(p.default)("Cast");case 9:return Object(p.default)("Storage")}}function P(e){return["s"+e.code+" ("+(S(e)||Object(p.default)("Unknown"))+")"].concat(function(e){var n=e.code,t=e.data;switch(n){case 1001:return["URI: "+t[0],t[1]?"Status code: "+t[1]:null,t[2]?"Response text: "+t[2]:null,t[3]?"Response headers: "+JSON.stringify(t[3],null,2):null,t[4]?"NetworkingEngine.RequestType: "+t[4]:null];case 3014:return["MediaError code: "+t[0]];case 3015:return["DOMException "+t[0].name+": "+t[0].message];case 3016:return["MediaError code: "+t[0],t[1]?"Edge/IE Error code: "+t[1]:null,t[2]?"Chrome error details: "+t[2]:null]}}(e)).filter(function(e){return e}).join(" – ")}var T=function(e){function n(n,t){var r;return(r=e.call(this,n,t)||this).onElementChange=function(e){d.attach(e),d.addEventListener("buffering",r.onBufferingChange),d.addEventListener("error",r.onError),d.configure({streaming:{bufferingGoal:r.props.bufferingGoal,jumpLargeGaps:!0,retryParameters:{maxAttempts:1/0}},abr:{defaultBandwidthEstimate:r.props.defaultBandwidthEstimate}}),d.load(r.props.src,r.props.positionSeconds).then(function(){d&&r.setState({isReadyToPlay:!0})},function(e){d&&r.onError({detail:e})})},r.onHTMLError=function(){},r.onBufferingChange=function(e){e.buffering},r.onError=function(e){var n=e.detail,t=void 0===n?{}:n,o=t.severity,a=P(t);o===C?(l.a.warn("[Player] A critical Shaka error occurred: "+a+"; the player cannot recover"),r.props.onError&&r.props.onError({code:"s"+t.code,category:S(t.category)})):o===b?l.a.warn("[Player] A Shaka error occurred: "+a+"; the player will attempt to recover"):l.a.warn("[Player] A Shaka error occurred: "+a+"; the severity is unknown")},f(),d||(d=new n.Player),r.state={isReadyToPlay:!1},r}i()(n,e);var t=n.prototype;return t.componentWillUnmount=function(){d&&(d.removeEventListener("buffering",this.onBufferingChange),d.removeEventListener("error",this.onError),d.detach(),d.unload())},t.render=function(){return v(y,o()({},this.props,{healthCheckSecondsFromEnd:this.props.bufferingGoal,mediaComponent:E.a,isReadyToPlay:this.state.isReadyToPlay,onElementChange:this.onElementChange,onError:this.onHTMLError}))},n}(w);T.displayName="ShakaMedia",T.defaultProps=Object.assign({},E.a.defaultProps,{bufferingGoal:70,Player:c.Player});n.default=T}}]);