Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/modules/video-player.min.js
Назад
'use strict';(function(k,b){const l=k.isTouch?window.PointerEvent?"pointerdown":"touchstart":"click",M=/iPhone|iPad|iPod|Mac OS/i.test(window.navigator.userAgent),w=function(a){a=Infinity===a?0:a;a=(new Date(1E3*a)).toISOString().substr(11,8).split(":");"00"===a[0]&&a.splice(0,1);return a.join(":")},U=function(a){try{if(a.requestFullscreen)return a.requestFullscreen();if(a.webkitEnterFullscreen)return a.webkitEnterFullscreen();if(a.webkitrequestFullscreen)return a.webkitRequestFullscreen();if(a.mozRequestFullscreen)return a.mozRequestFullScreen()}catch(c){return console.error(c), !1}},V=function(){try{return b.exitFullscreen?b.exitFullscreen():b.webkitExitFullscreen||b.webkitExitFullscreen?b.webkitExitFullscreen():b.mozCancelFullScreen?b.mozCancelFullScreen():b.msExitFullscreen?b.msExitFullscreen():!1}catch(a){return console.error(a),!1}},W=function(a){return b.exitFullscreen?"":b.webkitExitFullscreen||a.webkitSupportsFullscreen?"webkit":b.mozCancelFullScreen?"moz":b.msExitFullscreen?"ms":!1},N=function(a){const c=W(a);return!1===c?!1:a.hasOwnProperty("webkitDisplayingFullscreen")? a.webkitDisplayingFullscreen:""===c?b.fullscreenElement:b[c+"FullscreenElement"]},m=function(a,c){const f=b.createElementNS("http://www.w3.org/2000/svg","use"),d=b.createElementNS("http://www.w3.org/2000/svg","svg");a="tf-"+a;d.setAttribute("class","tf_fa "+(c?a+" "+c:a));f.setAttributeNS(null,"href","#"+a);d.appendChild(f);return d},X=function(a){a="tf_video_"+a+"=";for(let c=b.cookie.split(";"),f=c.length-1;-1<f;--f){let b=c[f];for(;" "===b[0];)b=b.substring(1,b.length);if(0===b.indexOf(a))return b.substring(a.length, b.length)}return null},Y=function(a,c,f){var d="";a="tf_video_"+a;f&&(d=new Date,d.setTime(d.getTime()+864E5*f),d="; expires="+d.toUTCString());b.cookie=a+"="+(c||"")+d+"; path=/"},E=function(a,c){c=b.createDocumentFragment();var f=W(a);const d=k.hash(a.currentSrc.split(".").slice(0,-1).join(".")),O=X(d)||0,x=X("vol_"+d)||-1,e=a.parentNode;var q=b.createElement("div");const r=b.createElement("div"),E=b.createElement("div"),t=b.createElement("div"),P=b.createElement("div"),Q=b.createElement("div"), u=b.createElement("div"),F=b.createElement("div"),G=b.createElement("div"),y=b.createElement("div"),R=b.createElement("div"),H=b.createElement("div"),I=b.createElement("div"),h=b.createElement("button"),J=b.createElement("button"),z=b.createElement("button"),v=b.createElement("button"),A=b.createElement("button"),B=b.createElement("button"),n=b.createElement("input"),p=b.createElement("input"),Z=!1===M||"mobile"!==k.device;let K=!0,L=!1,C=!1,S;E.className="tf_loader";q.className="tf_video_container tf_w tf_rel tf_box"; r.className="tf_video_wrap tf_w tf_mw tf_box";R.className="tf_play_wrap";y.className="tf_video_controls";t.className="tf_video_progress_wrap tf_rel tf_textl";P.className="tf_video_progress_loaded tf_w tf_h tf_abs";Q.className="tf_video_progress_current tf_w tf_h tf_abs";n.className="tf_video_progress_range tf_w tf_h tf_abs";n.value=0;n.type="range";n.min=0;n.max=100;z.className="tf_video_play";J.className="tf_video_play tf_big_video_play";z.appendChild(m("fas-undo-alt","tf_hide"));J.appendChild(m("fas-undo-alt", "tf_hide"));e.tabIndex=0;-1!==x&&(x?a.volume=x:a.muted=0);h.type=J.type=z.type=v.type=A.type=B.type="button";A.className="tf_video_seek tf_video_seek_left tf_abs";B.className="tf_video_seek tf_video_seek_right tf_abs";H.className="tf_video_current_time";I.className="tf_video_total_time";u.className="tf_video_hover tf_abs tf_hide tf_box tf_textc";v.className="tf_video_fullscreen";H.textContent=w(a.currentTime);I.textContent=w(a.duration);q=function(a){e.classList.add("tf_video_waiting");this.addEventListener("seeking"=== a.type?"seeked":"playing",function(){e.classList.remove("tf_video_waiting")},{passive:!0,once:!0})};const aa=function(){try{a.webkitSupportsPresentationMode?a.webkitSetPresentationMode("picture-in-picture"===a.webkitPresentationMode?"inline":"picture-in-picture"):(N(a)&&V(),a!==b.pictureInPictureElement?a.requestPictureInPicture():b.exitPictureInPicture())}catch(g){console.error(g)}},T=function(){e.classList.add("tf_video_touched");e.classList.remove("tf_hide_controls");S&&clearTimeout(S);S=setTimeout(function(){e.classList.remove("tf_video_touched")}, 2500)},ba=function(){!1===C&&(C=!0,"desktop"!==k.device&&(a.muted=!0));a.play()};r.addEventListener(l,function(a){a.stopPropagation()},{passive:!0});e.addEventListener(l,function(b){const g=b.target.closest(".tf_video_seek");b.stopImmediatePropagation();a.paused||!1===C||!k.isTouch||!g&&this.classList.contains("tf_video_touched")?(this.classList.remove("tf_video_touched"),a.paused||!1===C?ba():a.pause()):(T(),g&&(a.currentTime+=g.classList.contains("tf_video_seek_left")?-15:15))},{passive:!0});z.addEventListener(l, function(b){b.stopPropagation();a.paused||!1===C?ba():a.pause()},{passive:!0});if(!k.isTouch)t.addEventListener("mouseenter",function(b){if(!isNaN(a.duration)){u.classList.remove("tf_hide");const b=this.clientWidth,g=parseFloat(u.clientWidth/2),e=a.duration,c=function(a){a=void 0!==a.layerX?a.layerX:a.offsetX;0<a-g&&a<=b&&(u.style.transform="translateX("+(a-g)+"px)",!1===L&&(u.textContent=w(parseFloat(a/b)*e)))};this.addEventListener("mouseleave",function(){u.classList.add("tf_hide");this.removeEventListener("mousemove", c,{passive:!0})},{passive:!0,once:!0});this.addEventListener("mousemove",c,{passive:!0})}},{passive:!0});else if(!0===M){var D=window.navigator.userAgent;13.5>parseFloat(D.substr(D.indexOf("OS ")+3,4).replace("_","."))&&(D=function(a){var b="touchstart"===a.type?a.touches[0]?a.touches[0]:a.changedTouches[0]:a;a=this.getElementsByTagName("input")[0];const g=this.getBoundingClientRect();b=a.classList.contains("tf_video_volumn_range")?(b.clientY-g.top)/g.height:(b.clientX-g.left)/g.width;a.value=parseInt(100* b);k.triggerEvent(a,"input");k.triggerEvent(a,"change")},t.addEventListener(l,D,{passive:!0}),!0===Z&&G.addEventListener(l,D,{passive:!0}))}n.addEventListener("input",function(b){b.preventDefault();isNaN(a.duration)||(a.paused||!0!==K||a.pause(),L=!0,b=parseInt(this.value),b=100===b?a.duration-1:parseFloat(b*a.duration/100).toFixed(4),a.currentTime=b,k.isTouch||(u.textContent=w(b)))});n.addEventListener("change",function(b){b.preventDefault();isNaN(a.duration)||(L=K=!1,a.paused&&a.play().then(a=> {K=!0}).catch(a=>{K=!0}))});a.addEventListener("progress",function(){0<this.buffered.length&&(P.style.transform="scaleX("+parseFloat(this.buffered.end(0)/this.duration).toFixed(4)+")")},{passive:!0});a.addEventListener("durationchange",function(){I.textContent=w(this.duration)},{passive:!0});a.addEventListener("seeking",q,{passive:!0});a.addEventListener("waiting",q,{passive:!0});a.addEventListener("emptied",q,{passive:!0});a.addEventListener("pause",function(){e.classList.remove("tf_video_is_playing")}, {passive:!0});a.addEventListener("play",function(){e.classList.add("tf_video_is_playing");for(let a=b.getElementsByTagName("video"),c=a.length-1;-1<c;--c)a[c]!==this&&a[c].pause()},{passive:!0});a.addEventListener("playing",function(){e.classList.remove("tf_video_ended")},{passive:!0});a.addEventListener("ended",function(){e.classList.add("tf_video_ended")},{passive:!0});a.addEventListener("timeupdate",function(){if(!isNaN(this.duration)){H.textContent=w(this.currentTime);const b=parseFloat(this.currentTime/ a.duration);Q.style.transform="scaleX("+b.toFixed(4)+")";!1===L&&(n.value=parseInt(100*b));Y(d,this.currentTime,30)}},{passive:!0});if(!1!==f){let g=!1,c=!1;const d=function(){h(!0);c&&clearTimeout(c);c=setTimeout(h,3E3)},h=function(a){!0===g||!0===a?(g=!1,e.classList.remove("tf_hide_controls")):(g=!0,e.classList.add("tf_hide_controls"))};q=function(c){const g=c.touches?c.touches[0].target:c.target;if("dblclick"!==c.type||g&&!g.closest(".tf_video_wrap"))c.preventDefault(),N(a)?V(a):(c=function(){U(e)|| U(a)},b.pictureInPictureElement||"picture-in-picture"===a.webkitPresentationMode?(aa(),setTimeout(c,80)):c())};v.addEventListener(l,q);k.isTouch||e.addEventListener("dblclick",q);e.addEventListener(f+"fullscreenchange",function(b){N(a)?(e.classList.add("tf_is_fullscreen"),e.addEventListener("mousemove",d,{passive:!0}),a.addEventListener("pause",d,{passive:!0}),c&&clearTimeout(c),c=setTimeout(h,3E3)):(e.classList.remove("tf_is_fullscreen","tf_hide_controls"),c&&clearTimeout(c),a.removeEventListener("pause", d,{passive:!0}),e.removeEventListener("mousemove",d,{passive:!0}))},{passive:!0})}else v.className+=" tf_fullscreen_disabled tf_play_disabled";v.appendChild(m("fas-expand"));t.appendChild(P);t.appendChild(n);t.appendChild(Q);t.appendChild(u);!0===Z&&(p.addEventListener("input",function(b){b.preventDefault();b=parseFloat(this.value/100).toFixed(3);a.volume=b;a.muted=0<b?!1:!0}),a.addEventListener("volumechange",function(){!0===this.muted||0===this.volume?h.classList.add("tf_muted"):h.classList.remove("tf_muted"); Y("vol_"+d,this.volume,120)},{passive:!0}),h.addEventListener(l,function(b){a.muted=!a.muted;a.muted||0!==a.volume||(p.value=50,k.triggerEvent(p,"input"))},{passive:!0}),h.appendChild(m("fas-volume-up")),h.appendChild(m("fas-volume-mute")),F.appendChild(h),p.min=0,p.max=100,p.type="range",p.value=-1<x?100*x:50,G.className="tf_video_volumn_inner",p.className="tf_video_volumn_range",F.className="tf_video_volumn_wrap tf_rel",h.className="tf_video_mute tf_rel tf_overflow",a.muted&&(h.className+=" tf_muted"), G.appendChild(p),F.appendChild(G),y.appendChild(F));!a.hasAttribute("disablePictureInPicture")&&b.pictureInPictureEnabled&&(f=b.createElement("button"),f.addEventListener(l,aa,{passive:!0}),f.className="tf_video_pip",a.addEventListener("enterpictureinpicture",function(a){e.classList.add("tf_is_pip")},{passive:!0}),a.addEventListener("leavepictureinpicture",function(a){e.classList.remove("tf_is_pip")},{passive:!0}),f.appendChild(m("fas-external-link-alt")),y.appendChild(f));y.appendChild(v);R.appendChild(z); r.appendChild(R);r.appendChild(H);r.appendChild(t);r.appendChild(I);r.appendChild(y);B.innerHTML=A.innerHTML="<span>15</span>";B.appendChild(m("fas-redo-alt"));A.appendChild(m("fas-undo-alt"));c.appendChild(A);c.appendChild(B);c.appendChild(r);c.appendChild(J);c.appendChild(E);e.appendChild(c);window.WebKitPlaybackTargetAvailabilityEvent&&a.addEventListener("webkitplaybacktargetavailabilitychanged",function(c){"available"===c.availability&&(c=b.createElement("button"),c.className="tf_video_airplay", c.addEventListener(l,function(){a.webkitShowPlaybackTargetPicker()},{passive:!0}),c.appendChild(m("fas-airplay")),v.before(c))},{passive:!0,once:!0});0<O&&O<a.duration&&(a.currentTime=O);a.setAttribute("webkit-playsinline","1");a.setAttribute("playsinline","1");a.removeAttribute("controls");e.classList.remove("tf_lazy")},T=function(a,c){for(let f=a.length-1;-1<f;--f){let d=a[f],l=d.parentNode;if(!l.classList.contains("tf_video_lazy")){let a=b.createElement("div");a.className="tf_video_lazy tf_w tf_box tf_rel tf_overflow tf_lazy"; a.appendChild(d);l.appendChild(a)}4===d.readyState?E(d,c):k.requestIdleCallback(function(){d.addEventListener("loadedmetadata",function(){E(this)},{passive:!0,once:!0});d.setAttribute("preload","metadata");!0===M&&d.load()},200)}};k.on("tf_video_init",function(a){a instanceof jQuery?a=a.get():void 0===a.length&&(a=[a]);T(a)})})(Themify,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка