Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/public_html/media/plg_system_nrframework/js/widgets/video/ |
function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),_setPrototypeOf(t.prototype.constructor=t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var TF_Dailymotion_Video=function(e){function t(t){t=e.call(this,t)||this;return t.player=null,t}_inheritsLoose(t,e);var o=t.prototype;return o.init=function(){this.maybeLoadAPI()},o.pause=function(){this.player&&this.player.pause()},o.dailymotionApiLoaded=function(){return window.dailymotion&&void 0!==window.dailymotion},o.maybeLoadAPI=function(){var t,e,o,i=this;if(!document.querySelector('script[data-video="'+this.dataset.videoId+'"]')||this.dailymotionApiLoaded())return(t=document.createElement("script")).src="https://geo.dailymotion.com/player.js",t.setAttribute("data-video",this.dataset.videoId),(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,e),o=function t(e){i.dailymotionApiLoaded()?i.initDailymotionVideo():setTimeout(function(){return t(e)},350)},new Promise(function(t,e){o(t)})},o.initDailymotionVideo=function(){function e(t){0<parseInt(o.dataset.videoEnd)&&parseInt(t.videoTime)>=parseInt(o.dataset.videoEnd)&&(o.pause(),o.dataset.videoEnd=0)}var o=this,i=this;dailymotion.createPlayer(this.videoElement.querySelector(":scope div").id,{video:this.dataset.videoId,params:{mute:"true"===this.dataset.videoMute,startTime:this.dataset.videoStart,loop:"true"===this.dataset.videoLoop,autoplay:!1}}).then(function(t){i.player=t,0<parseInt(i.dataset.videoEnd)&&(i.player.on("timeupdate",e),i.player.on("seeking",function(t){t.videoTime<1||i.player.off("timeupdate",e)}))}).catch(function(t){return console.error(t)})},t}(TF_Video);