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