(this.webpackJsonpimonitornextgen=this.webpackJsonpimonitornextgen||[]).push([[39],{1348:function(e,t,n){var a,o=Object.create,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,r=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,p=(e,t,n,a)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of i(t))u.call(e,o)||o===n||l(e,o,{get:()=>t[o],enumerable:!(a=s(t,o))||a.enumerable});return e},c=(e,t,n)=>(((e,t,n)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),h={};((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})})(h,{default:()=>P}),e.exports=(a=h,p(l({},"__esModule",{value:!0}),a));var y=((e,t,n)=>(n=null!=e?o(r(e)):{},p(!t&&e&&e.__esModule?n:l(n,"default",{value:e,enumerable:!0}),e)))(n(0)),d=n(564),b=n(719);class P extends y.Component{constructor(){var e;super(...arguments),e=this,c(this,"callPlayer",d.callPlayer),c(this,"playerID",this.props.config.playerId||"".concat("wistia-player-").concat((0,d.randomString)())),c(this,"onPlay",(function(){return e.props.onPlay(...arguments)})),c(this,"onPause",(function(){return e.props.onPause(...arguments)})),c(this,"onSeek",(function(){return e.props.onSeek(...arguments)})),c(this,"onEnded",(function(){return e.props.onEnded(...arguments)})),c(this,"onPlaybackRateChange",(function(){return e.props.onPlaybackRateChange(...arguments)})),c(this,"mute",()=>{this.callPlayer("mute")}),c(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:t,muted:n,controls:a,onReady:o,config:l,onError:s}=this.props;(0,d.getSDK)("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then(e=>{l.customControls&&l.customControls.forEach(t=>e.defineControl(t)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:t,silentAutoPlay:"allow",muted:n,controlsVisibleOnLoad:a,fullscreenButton:a,playbar:a,playbackRateControl:a,qualityControl:a,volumeControl:a,settingsControl:a,smallPlayButton:a,...l.options},onReady:e=>{this.player=e,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},s)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.callPlayer("time",e),t||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,t=e&&e.match(b.MATCH_URL_WISTIA)[1],n="wistia_embed wistia_async_".concat(t);return y.default.createElement("div",{id:this.playerID,key:t,className:n,style:{width:"100%",height:"100%"}})}}c(P,"displayName","Wistia"),c(P,"canPlay",b.canPlay.wistia),c(P,"loopOnEnded",!0)}}]);
//# sourceMappingURL=reactPlayerWistia.269a8e57.chunk.js.map