Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/themify-builder/js/modules/fullwidthvideo.min.js
Ðазад
'use strict';(function(g,k){const l="mobile"===g.device,m=function(a){return{mute:"unmute"!==a.getAttribute("data-mutevideo"),loop:"unloop"!==a.getAttribute("data-unloopvideo")}},p=function(a){g.cssLazy.tb_fullwidth_video?a():g.LoadCss(ThemifyBuilderModuleJs.cssUrl+"fullwidthvideo.css",null,null,null,function(){g.cssLazy.tb_fullwidth_video=!0;a&&a()})},n=function(a,f,c,e){const b=k.createElement("div"),d=k.createElement("iframe");b.className="tb_fullwidth_video tf_lazy tb_"+c+" tf_abs tf_w tf_h tf_overflow"; d.setAttribute("allowfullscreen",!1);d.setAttribute("webkitallowfullscreen",!1);d.setAttribute("mozallowfullscreen",!1);d.className="tf_mw tf_w tf_h";d.id=a;d.src=encodeURI(f);e&&(d.setAttribute("data-autoplay",!0),d.setAttribute("allow","autoplay"));d.setAttribute("unselectable","on");b.appendChild(d);return b},q=function(a,f,c){a=m(a);const e="tb_vimeo_"+c;f=new URL(f);c="https://player.vimeo.com/video/"+c+"?api=1&byline=0&autopause=0&portrait=0&title=0&badge=0&controls=0&playsinline=1&callback=tb_vimeo&player_id="+ e;let b=!1;a.loop&&(c+="&loop=1");!1!==a.autoplay&&(c+="&autoplay=1",b=a.mute=!0);!0===a.mute&&(c+="&muted=1");f.hash&&0===f.hash.indexOf("#t=")&&(c+=f.hash);a=n(e,c,"vimeo",b);const d=a.firstChild,h=function(a){if(-1!==a.origin.indexOf("player.vimeo.com")&&(a=JSON.parse(a.data),e===a.player_id))if("ready"===a.event)d.contentWindow.postMessage(JSON.stringify({method:"getVideoWidth"}),"https://player.vimeo.com"),d.contentWindow.postMessage(JSON.stringify({method:"getVideoHeight"}),"https://player.vimeo.com"); else if("getVideoWidth"===a.method||"getVideoHeight"===a.method){"getVideoWidth"===a.method?d.setAttribute("width",a.value):d.setAttribute("height",a.value);a=d.getAttribute("width");const c=d.getAttribute("height");c&&a&&(window.removeEventListener("message",h,{passive:!0}),d.style.minHeight=100*parseFloat(c/a)+"vw",d.style.minWidth=100*parseFloat(a/c)+"vh",d.parentNode.classList.remove("tf_lazy"))}};window.addEventListener("message",h,{passive:!0});return a},r=function(a,f,c){if(!1===l&&c){c=c.toString(); var e=m(a),b=new URL(f);a="tb_ytb_"+c;let d="https://www.youtube-nocookie.com/embed/"+c+"?modestbranding=1&playsinline=1&controls=0&showinfo=0&rel=0&disablekb&fs=0&version=3&allowfullscreen=false&wmode=transparent&iv_load_policy=3&playerapiid="+a+"&playlist="+c;c=640;f=360;let h=!1;e.loop&&(d+="&loop=1");!1!==e.autoplay&&(d+="&autoplay=1",h=e.mute=!0);!0===e.mute&&(d+="&mute=1");if(b){e=b.searchParams.get("t");const a=b.searchParams.get("w");b=b.searchParams.get("h");e&&(d+="&start="+parseInt(e)); a&&(c=a);b&&(f=b)}a=n(a,d,"ytb",h);b=a.firstChild;b.style.minHeight=100*parseFloat(f/c)+"vw";b.style.minWidth=100*parseFloat(c/f)+"vh";b.addEventListener("load",function(){this.parentNode.classList.remove("tf_lazy")},{passive:!0,once:!0});return a}};g.on("tb_fullwidth_video_init",function(a){p(function(){a instanceof jQuery&&(a=a.get());for(let b=a.length-1;-1<b;--b){var f=a[b].getAttribute("data-fullwidthvideo");if(f){var c=g.parseVideo(f),e=a[b].getElementsByClassName("tb_fullwidth_video")[0];e&& e.parentNode===a[b]&&a[b].removeChild(e);if("youtube"===c.type)c=r(a[b],f,c.id);else if("vimeo"===c.type)c=q(a[b],f,c.id);else if(c=a[b],!1===l||"play"===c.getAttribute("data-playonmobile")){e=!0===l?{loop:"unloop"!==c.getAttribute("data-unloopvideo"),mute:!0}:m(c);const a=k.createElement("div"),b=k.createElement("video");a.className="tb_fullwidth_video tb_local_video tf_abs tf_w tf_h";b.className="tf_w tf_h";b.setAttribute("type","video/"+f.split(".").pop().split("?")[0]);b.preload="auto";"no"=== c.dataset.autoplay?e.autoplay=!1:b.setAttribute("data-autoplay",!0);b.setAttribute("webkit-playsinline",1);b.setAttribute("playsinline",!0);b.src=f;!1!==e.autoplay&&(b.autoplay=!0,e.mute=!0);!0===e.mute&&(b.muted=!0);!0===e.loop&&(b.loop=!0);a.appendChild(b);c=a}else c=void 0;c&&(a[b].insertBefore(c,a[b].firstChild),g.trigger("tb_fullwidth_video_added",[a[b]]))}}})})})(Themify,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка