(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6328],{23994:(e,t,r)=>{let a,s,i;var n=Object.create,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,y=(e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of p(t))h.call(e,s)||s===r||l(e,s,{get:()=>t[s],enumerable:!(a=o(t,s))||a.enumerable});return e},c=(e,t,r)=>{let a;return(a="symbol"!=typeof t?t+"":t)in e?l(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,r},d={},m={default:()=>O};for(var f in m)l(d,f,{get:m[f],enumerable:!0});e.exports=y(l({},"__esModule",{value:!0}),d);var g=(i=null!=(a=r(50245))?n(u(a)):{},y(!s&&a&&a.__esModule?i:l(i,"default",{value:a,enumerable:!0}),a)),b=r(90533),P=r(60595);class O extends g.Component{constructor(){super(...arguments),c(this,"callPlayer",b.callPlayer),c(this,"onDurationChange",()=>{let e=this.getDuration();this.props.onDuration(e)}),c(this,"mute",()=>{this.callPlayer("setMuted",!0)}),c(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),c(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){let{controls:t,config:r,onError:a,playing:s}=this.props,[,i]=e.match(P.MATCH_URL_DAILYMOTION);this.player?this.player.load(i,{start:(0,b.parseStartTime)(e),autoplay:s}):(0,b.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",e=>e.player).then(s=>{if(!this.container)return;let n=s.player;this.player=new n(this.container,{width:"100%",height:"100%",video:i,params:{controls:t,autoplay:this.props.playing,mute:this.props.muted,start:(0,b.parseStartTime)(e),origin:window.location.origin,...r.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:e=>a(e)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){let{display:e}=this.props;return g.default.createElement("div",{style:{width:"100%",height:"100%",display:e}},g.default.createElement("div",{ref:this.ref}))}}c(O,"displayName","DailyMotion"),c(O,"canPlay",P.canPlay.dailymotion),c(O,"loopOnEnded",!0)}}]);