acf
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
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);
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
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_FacebookVideo_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(){var t=this.initFacebookVideo.bind(this);this.maybeLoadFbRoot(),this.maybeLoadAPIScript(t)},o.initFacebookVideo=function(){var o;this.addFacebookVideo(),"object"==typeof FB&&(FB.XFBML.parse((o=this).video),FB.Event.subscribe("xfbml.ready",function(t){var e=o.video.id+"_"+o.video.querySelector(".tf-video-embed").dataset.videoId;"video"===t.type&&e===t.id&&(o.player=t.instance)}))},o.pause=function(){this.player&&this.player.pause()},o.maybeLoadFbRoot=function(){var t;document.getElementById("fb-root")||((t=document.createElement("div")).id="fb-root",document.body.appendChild(t))},o.maybeLoadAPIScript=function(t){var e;document.querySelector(".tf-fb-sdk-api-script")?t&&t():((e=document.createElement("script")).className="tf-fb-sdk-api-script",e.id="tf-fb-sdk-api-script",e.async=!0,e.src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2",t&&(e.onload=t),(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))},o.addFacebookVideo=function(){var t='\n\t\t\t<div\n\t\t\t\tclass="fb-video"\n\t\t\t\tid="'+this.video.id+"_"+this.dataset.videoId+'"\n\t\t\t\tdata-href="'+this.dataset.videoId+'"\n\t\t\t\tdata-allowfullscreen="'+this.dataset.videoFs+'"\n\t\t\t\tdata-autoplay="'+this.dataset.videoAutoplay+'"\n\t\t\t\tdata-width="'+this.dataset.videoWidth+'"\n\t\t\t\tdata-show-text="'+this.dataset.videoShowText+'"\n\t\t\t\tdata-show-captions="'+this.dataset.videoShowCaptions+'"\n\t\t\t\tdata-lazy="false"\n\t\t\t\t>\n\t\t\t</div>\n\t\t';this.videoElement.innerHTML=t},t}(TF_Video);
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
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_SelfHostedVideo_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.maybeLoadVideo()},o.pause=function(){this.player&&this.player.pause()},o.maybeLoadVideo=function(){this.player=this.videoElement.querySelector("video");var t=this.player.querySelector("source");t.src=t.dataset.src,this.player.load()},t}(TF_Video);
|
||||
|
||||
2
media/plg_system_nrframework/js/widgets/video/vimeo.js
Normal file
2
media/plg_system_nrframework/js/widgets/video/vimeo.js
Normal file
@ -0,0 +1,2 @@
|
||||
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_Vimeo_Video=function(e){function t(t){t=e.call(this,t)||this;return t.player=null,t}_inheritsLoose(t,e);var i=t.prototype;return i.init=function(){this.maybeLoadVimeoAPI()},i.pause=function(){this.player&&this.player.pause()},i.vimeoApiLoaded=function(){return window.Vimeo&&window.Vimeo.Player&&void 0!==window.Vimeo.Player},i.maybeLoadVimeoAPI=function(){function i(t){o.vimeoApiLoaded()?o.initVimeoVideo():setTimeout(function(){return i(t)},350)}var t,e,o=this;document.querySelector(".tf-vimeo-api-script")||this.vimeoApiLoaded()||((t=document.createElement("script")).className="tf-vimeo-api-script",t.src="https://player.vimeo.com/api/player.js",(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,e));return new Promise(function(t,e){i(t)})},i.initVimeoVideo=function(){var e=this,i=this,o=(this.player=new window.Vimeo.Player(this.videoElement,{id:this.dataset.videoId,loop:this.setAttributeBool(this.dataset,"videoLoop"),autoplay:this.setAttributeBool(this.dataset,"videoAutoplay"),controls:this.setAttributeBool(this.dataset,"videoControls"),title:this.setAttributeBool(this.dataset,"videoTitle"),byline:this.setAttributeBool(this.dataset,"videoByline"),portrait:this.setAttributeBool(this.dataset,"videoPortrait"),color:this.dataset.videoColor.substring(1),autopause:!1,muted:this.setAttributeBool(this.dataset,"videoMute"),dnt:this.setAttributeBool(this.dataset,"videoPrivacy"),keyboard:this.setAttributeBool(this.dataset,"videoKeyboard"),pip:this.setAttributeBool(this.dataset,"videoPip")}),this.dataset.videoStart&&this.player.setCurrentTime(this.dataset.videoStart),parseInt(this.dataset.videoStart)),s=(0<o&&this.player.on("play",function(t){0===parseInt(t.seconds)&&this.player.setCurrentTime(o)}),function(t){0<parseInt(e.dataset.videoEnd)&&parseInt(t.seconds)>=parseInt(e.dataset.videoEnd)&&(e.pause(),e.dataset.videoEnd=0)});0<parseInt(this.dataset.videoEnd)&&(this.player.on("timeupdate",s),this.player.on("seeked",function(t){parseInt(t.seconds)<1||i.player.off("timeupdate",s)})),this.player.on("loaded",function(){"true"!==i.video.dataset.readonly&&"true"!==i.video.dataset.disabled&&("true"===i.dataset.videoAutoplay&&i.overlay?i.video.classList.add("hiddenOverlay"):"false"===i.dataset.videoAutoplay&&i.overlay&&(i.player.play(),i.player.on("play",function(){i.video.classList.add("hiddenOverlay")})))})},t}(TF_Video);
|
||||
|
||||
2
media/plg_system_nrframework/js/widgets/video/youtube.js
Normal file
2
media/plg_system_nrframework/js/widgets/video/youtube.js
Normal file
@ -0,0 +1,2 @@
|
||||
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_YouTube_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.maybeLoadYouTubeAPI()},o.pause=function(){this.player&&this.player.pauseVideo()},o.youTubeApiLoaded=function(){return window.YT&&window.YT.Player&&void 0!==window.YT.Player},o.maybeLoadYouTubeAPI=function(){function o(t){i.youTubeApiLoaded()?i.initYouTubeVideo():setTimeout(function(){return o(t)},350)}var t,e,i=this;document.querySelector(".tf-youtube-api-script")||this.youTubeApiLoaded()||((t=document.createElement("script")).className="tf-youtube-api-script",t.src="https://www.youtube.com/player_api",(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,e));return new Promise(function(t,e){o(t)})},o.initYouTubeVideo=function(){var e=this,t="https://www.youtube"+("true"===this.dataset.videoPrivacy?"-nocookie":"")+".com";this.player=new window.YT.Player(this.videoElement,{videoId:this.dataset.videoId,playerVars:{autoplay:this.setAttributeBool(this.dataset,"videoAutoplay"),controls:this.setAttributeBool(this.dataset,"videoControls"),showinfo:0,loop:this.setAttributeBool(this.dataset,"videoLoop"),playlist:this.dataset.videoId,fs:this.setAttributeBool(this.dataset,"videoFs"),cc_load_policy:this.setAttributeBool(this.dataset,"videoCc"),disablekb:this.setAttributeBool(this.dataset,"videoDisablekb"),rel:"1"==this.dataset.videoRel?1:0,iv_load_policy:3,autohide:0,color:this.dataset.videoColor,mute:this.setAttributeBool(this.dataset,"videoMute"),start:parseInt(this.dataset.videoStart,10)||void 0,end:parseInt(this.dataset.videoEnd,10)||void 0},host:t,events:{onReady:function(t){"true"!==e.video.dataset.readonly&&"true"!==e.video.dataset.disabled&&("true"===e.dataset.videoAutoplay&&e.overlay?e.video.classList.add("hiddenOverlay"):"false"===e.dataset.videoAutoplay&&e.overlay&&(e.video.classList.add("hiddenOverlay"),e.player.playVideo()))},onStateChange:function(t){t.data===window.YT.PlayerState.PLAYING&&e.video.classList.add("hiddenOverlay")}}})},t}(TF_Video);
|
||||
|
||||
Reference in New Issue
Block a user