(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3392],{19602:(e,t,a)=>{let r,s,l;var o=Object.create,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,y=(e,t,a,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of p(t))h.call(e,s)||s===a||i(e,s,{get:()=>t[s],enumerable:!(r=n(t,s))||r.enumerable});return e},d=(e,t,a)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?i(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,a},c={},m={default:()=>_};for(var P in m)i(c,P,{get:m[P],enumerable:!0});e.exports=y(i({},"__esModule",{value:!0}),c);var b=(l=null!=(r=a(50245))?o(u(r)):{},y(!s&&r&&r.__esModule?l:i(l,"default",{value:r,enumerable:!0}),r)),f=a(90533),g=a(60595);class _ extends b.Component{constructor(){super(...arguments),d(this,"callPlayer",f.callPlayer),d(this,"mute",()=>{this.setVolume(0)}),d(this,"unmute",()=>{null!==this.props.volume&&this.setVolume(this.props.volume)}),d(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){let{playing:t,config:a,onError:r,onDuration:s}=this.props,l=e&&e.match(g.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,f.getSDK)("https://play.vidyard.com/embed/v4.js","VidyardV4","onVidyardAPI").then(e=>{this.container&&(e.api.addReadyListener((e,t)=>{this.player||(this.player=t,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),e.api.renderPlayer({uuid:l,container:this.container,autoplay:+!!t,...a.options}),e.api.getPlayerMetadata(l).then(e=>{this.duration=e.length_in_seconds,s(e.length_in_seconds)}))},r)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){let{display:e}=this.props;return b.default.createElement("div",{style:{width:"100%",height:"100%",display:e}},b.default.createElement("div",{ref:this.ref}))}}d(_,"displayName","Vidyard"),d(_,"canPlay",g.canPlay.vidyard)}}]);