// source --> https://javierbergia.com/wp-content/plugins/wp-menu-cart/javascript/wpmenucart-ajax-assist.js?ver=43e8de66e8f08d6267ba3f050717d13e
/* This script is intended for sites with server side caching enabled - normally the classes in the menu would follow the cart state */
jQuery( function( $ ) {
/* Cart Hiding */
if ( typeof wpmenucart_ajax_assist.shop_plugin !== 'undefined' && wpmenucart_ajax_assist.shop_plugin.toLowerCase() == 'woocommerce' ) {
// update on page load
wpmenucart_update_menu_classes();
// update when cart is updated
$( document.body ).on( 'adding_to_cart added_to_cart updated_wc_div', wpmenucart_update_menu_classes );
}
function wpmenucart_update_menu_classes() {
if ( typeof window.Cookies !== 'undefined' ) { // WC3.0
items_in_cart = Cookies.get( 'woocommerce_items_in_cart' );
} else if ( typeof $.cookie !== 'undefined' && $.isFunction($.cookie) ){ // WC2.X
items_in_cart = $.cookie( 'woocommerce_items_in_cart' );
} else {
return; // no business here
}
if ( items_in_cart > 0 ) {
$('.empty-wpmenucart').removeClass('empty-wpmenucart');
} else if ( !(wpmenucart_ajax_assist.always_display) ) {
$('.wpmenucartli').addClass('empty-wpmenucart');
$('.wpmenucart-shortcode').addClass('empty-wpmenucart');
}
}
});
// source --> https://javierbergia.com/wp-content/themes/themify-music/themify/js/video.js?ver=43e8de66e8f08d6267ba3f050717d13e
/*! Video.js v4.6.3 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
(function() {var b=void 0,f=!0,j=null,l=!1;function m(){return function(){}}function q(a){return function(){return this[a]}}function r(a){return function(){return a}}var t;document.createElement("video");document.createElement("audio");document.createElement("track");function u(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(u.Aa[a])return u.Aa[a];a=u.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new u.Player(a,c,d)}
var videojs=u;window.ke=window.le=u;u.Vb="4.6";u.Qc="https:"==document.location.protocol?"https://":"http://";u.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},notSupportedMessage:"No compatible source was found for this video."};"GENERATED_CDN_VSN"!==u.Vb&&(videojs.options.flash.swf=u.Qc+"vjs.zencdn.net/"+u.Vb+"/video-js.swf");
u.Aa={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);u.pa=u.CoreObject=m();u.pa.extend=function(a){var c,d;a=a||{};c=a.init||a.h||this.prototype.init||this.prototype.h||m();d=function(){c.apply(this,arguments)};d.prototype=u.l.create(this.prototype);d.prototype.constructor=d;d.extend=u.pa.extend;d.create=u.pa.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};
u.pa.create=function(){var a=u.l.create(this.prototype);this.apply(a,arguments);return a};u.d=function(a,c,d){var e=u.getData(a);e.D||(e.D={});e.D[c]||(e.D[c]=[]);d.v||(d.v=u.v++);e.D[c].push(d);e.X||(e.disabled=l,e.X=function(c){if(!e.disabled){c=u.pc(c);var d=e.D[c.type];if(d)for(var d=d.slice(0),k=0,p=d.length;k
u.Ub;u.Yb=/Firefox/i.test(u.M);u.ae=/Chrome/i.test(u.M);u.fc=!!("ontouchstart"in window||window.Rc&&document instanceof window.Rc);
u.Cb=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.cd=function(){document.body.focus();document.onselectstart=r(l)};u.Ud=function(){document.onselectstart=r(f)};u.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};u.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
u.zb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
u.get=function(a,c,d,e){var g,h,k,p;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;k=u.Gd(a);p=window.location;k.protocol+k.host!==p.protocol+p.host&&window.XDomainRequest&&!("withCredentials"in
h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==k.protocol||"file:"==p.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(n){d(n);return}try{h.send()}catch(s){d(s)}};
u.Ld=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):18==d.code?u.log("LocalStorage not allowed (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.rc=function(a){a.match(/^https?:\/\//)||(a=u.e("div",{innerHTML:'x'}).firstChild.href);return a};
u.Gd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=u.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=u.e("div"),c.innerHTML='',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;he&&(a.preventDefault(),this.k("tap")))})}
u.s=u.a.extend({h:function(a,c){u.a.call(this,a,c);I(this);this.d("tap",this.q);this.d("click",this.q);this.d("focus",this.Va);this.d("blur",this.Ua)}});t=u.s.prototype;
t.e=function(a,c){var d;c=u.l.B({className:this.S(),role:"button","aria-live":"polite",tabIndex:0},c);d=u.a.prototype.e.call(this,a,c);c.innerHTML||(this.u=u.e("div",{className:"vjs-control-content"}),this.xb=u.e("span",{className:"vjs-control-text",innerHTML:this.sa||"Need Text"}),this.u.appendChild(this.xb),d.appendChild(this.u));return d};t.S=function(){return"vjs-control "+u.a.prototype.S.call(this)};t.q=m();t.Va=function(){u.d(document,"keyup",u.bind(this,this.da))};
t.da=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.q()};t.Ua=function(){u.p(document,"keyup",u.bind(this,this.da))};u.Q=u.a.extend({h:function(a,c){u.a.call(this,a,c);this.bd=this.ja(this.j.barName);this.handle=this.ja(this.j.handleName);this.d("mousedown",this.Wa);this.d("touchstart",this.Wa);this.d("focus",this.Va);this.d("blur",this.Ua);this.d("click",this.q);this.c.d("controlsvisible",u.bind(this,this.update));a.d(this.Bc,u.bind(this,this.update));this.R={}}});t=u.Q.prototype;
t.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=u.l.B({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return u.a.prototype.e.call(this,a,c)};t.Wa=function(a){a.preventDefault();u.cd();this.R.move=u.bind(this,this.Lb);this.R.end=u.bind(this,this.Mb);u.d(document,"mousemove",this.R.move);u.d(document,"mouseup",this.R.end);u.d(document,"touchmove",this.R.move);u.d(document,"touchend",this.R.end);this.Lb(a)};
t.Mb=function(){u.Ud();u.p(document,"mousemove",this.R.move,l);u.p(document,"mouseup",this.R.end,l);u.p(document,"touchmove",this.R.move,l);u.p(document,"touchend",this.R.end,l);this.update()};t.update=function(){if(this.b){var a,c=this.Db(),d=this.handle,e=this.bd;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=u.round(100*c,2)+"%"}e.w().style.width=u.round(100*a,2)+"%"}};
function J(a,c){var d,e,g,h;d=a.b;e=u.pd(d);h=g=d.offsetWidth;d=a.handle;if(a.j.Wd)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}t.Va=function(){u.d(document,"keyup",u.bind(this,this.da))};
t.da=function(a){37==a.which?(a.preventDefault(),this.Hc()):39==a.which&&(a.preventDefault(),this.Ic())};t.Ua=function(){u.p(document,"keyup",u.bind(this,this.da))};t.q=function(a){a.stopImmediatePropagation();a.preventDefault()};u.Y=u.a.extend();u.Y.prototype.defaultValue=0;u.Y.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=u.l.B({innerHTML:''+this.defaultValue+""},c);return u.a.prototype.e.call(this,"div",c)};u.ga=u.a.extend();
function ca(a,c){a.V(c);c.d("click",u.bind(a,function(){G(this)}))}u.ga.prototype.e=function(){var a=this.options().lc||"ul";this.u=u.e(a,{className:"vjs-menu-content"});a=u.a.prototype.e.call(this,"div",{append:this.u,className:"vjs-menu"});a.appendChild(this.u);u.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};u.I=u.s.extend({h:function(a,c){u.s.call(this,a,c);this.selected(c.selected)}});
u.I.prototype.e=function(a,c){return u.s.prototype.e.call(this,"li",u.l.B({className:"vjs-menu-item",innerHTML:this.j.label},c))};u.I.prototype.q=function(){this.selected(f)};u.I.prototype.selected=function(a){a?(this.o("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.r("vjs-selected"),this.b.setAttribute("aria-selected",l))};
u.L=u.s.extend({h:function(a,c){u.s.call(this,a,c);this.za=this.va();this.V(this.za);this.O&&0===this.O.length&&this.G();this.d("keyup",this.da);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});t=u.L.prototype;t.ra=l;t.va=function(){var a=new u.ga(this.c);this.options().title&&a.ia().appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.$(this.options().title),Sd:-1}));if(this.O=this.createItems())for(var c=0;ca&&(a=Infinity),this.duration(a),Infinity===a?this.o("vjs-live"):this.r("vjs-live"))};t.Bd=function(){this.isFullscreen()?this.o("vjs-fullscreen"):this.r("vjs-fullscreen")};
function V(a,c,d){if(a.g&&!a.g.ca)a.g.K(function(){this[c](d)});else try{a.g[c](d)}catch(e){throw u.log(e),e;}}function U(a,c){if(a.g&&a.g.ca)try{return a.g[c]()}catch(d){throw a.g[c]===b?u.log("Video.js: "+c+" method not defined for "+a.Ca+" playback technology.",d):"TypeError"==d.name?(u.log("Video.js: "+c+" unavailable on "+a.Ca+" playback technology element.",d),a.g.ca=l):u.log(d),d;}}t.play=function(){V(this,"play");return this};t.pause=function(){V(this,"pause");return this};
t.paused=function(){return U(this,"paused")===l?l:f};t.currentTime=function(a){return a!==b?(V(this,"setCurrentTime",a),this.Jb&&this.k("timeupdate"),this):this.z.currentTime=U(this,"currentTime")||0};t.duration=function(a){if(a!==b)return this.z.duration=parseFloat(a),this;this.z.duration===b&&this.zc();return this.z.duration||0};t.buffered=function(){var a=U(this,"buffered"),c=a.length-1,d=this.z.tb=this.z.tb||0;a&&(0<=c&&a.end(c)!==d)&&(d=a.end(c),this.z.tb=d);return u.zb(0,d)};
t.bufferedPercent=function(){return this.duration()?this.buffered().end(0)/this.duration():0};t.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.z.volume=a,V(this,"setVolume",a),u.Ld(a),this;a=parseFloat(U(this,"volume"));return isNaN(a)?1:a};t.muted=function(a){return a!==b?(V(this,"setMuted",a),this):U(this,"muted")||l};t.ab=function(){return U(this,"supportsFullScreen")||l};t.wc=l;t.isFullscreen=function(a){return a!==b?(this.wc=!!a,this):this.wc};
t.isFullScreen=function(a){u.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
t.requestFullscreen=function(){var a=u.Na.Bb;this.isFullscreen(f);a?(u.d(document,a.fullscreenchange,u.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&u.p(document,a.fullscreenchange,arguments.callee);this.k("fullscreenchange")})),this.b[a.requestFullscreen]()):this.g.ab()?V(this,"enterFullScreen"):(this.td=f,this.ld=document.documentElement.style.overflow,u.d(document,"keydown",u.bind(this,this.qc)),document.documentElement.style.overflow="hidden",
u.o(document.body,"vjs-full-window"),this.k("enterFullWindow"),this.k("fullscreenchange"));return this};t.exitFullscreen=function(){var a=u.Na.Bb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.g.ab()?V(this,"exitFullScreen"):(ea(this),this.k("fullscreenchange"));return this};t.qc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():ea(this))};
function ea(a){a.td=l;u.p(document,"keydown",a.qc);document.documentElement.style.overflow=a.ld;u.r(document.body,"vjs-full-window");a.k("exitFullWindow")}
t.src=function(a){if(a===b)return U(this,"src");if(a instanceof Array){var c;a:{c=a;for(var d=0,e=this.j.techOrder;dStream Type LIVE',"aria-live":"off"});a.appendChild(this.u);return a};u.bc=u.s.extend({h:function(a,c){u.s.call(this,a,c);a.d("play",u.bind(this,this.Ob));a.d("pause",u.bind(this,this.Nb))}});t=u.bc.prototype;t.sa="Play";
t.S=function(){return"vjs-play-control "+u.s.prototype.S.call(this)};t.q=function(){this.c.paused()?this.c.play():this.c.pause()};t.Ob=function(){u.r(this.b,"vjs-paused");u.o(this.b,"vjs-playing");this.b.children[0].children[0].innerHTML="Pause"};t.Nb=function(){u.r(this.b,"vjs-playing");u.o(this.b,"vjs-paused");this.b.children[0].children[0].innerHTML="Play"};u.fb=u.a.extend({h:function(a,c){u.a.call(this,a,c);a.d("timeupdate",u.bind(this,this.fa))}});
u.fb.prototype.e=function(){var a=u.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.u=u.e("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00',"aria-live":"off"});a.appendChild(this.u);return a};u.fb.prototype.fa=function(){var a=this.c.$a?this.c.z.currentTime:this.c.currentTime();this.u.innerHTML='Current Time '+u.ya(a,this.c.duration())};
u.gb=u.a.extend({h:function(a,c){u.a.call(this,a,c);a.d("timeupdate",u.bind(this,this.fa))}});u.gb.prototype.e=function(){var a=u.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.u=u.e("div",{className:"vjs-duration-display",innerHTML:'Duration Time 0:00',"aria-live":"off"});a.appendChild(this.u);return a};
u.gb.prototype.fa=function(){var a=this.c.duration();a&&(this.u.innerHTML='Duration Time '+u.ya(a))};u.hc=u.a.extend({h:function(a,c){u.a.call(this,a,c)}});u.hc.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"/
"})};u.nb=u.a.extend({h:function(a,c){u.a.call(this,a,c);a.d("timeupdate",u.bind(this,this.fa))}});
u.nb.prototype.e=function(){var a=u.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.u=u.e("div",{className:"vjs-remaining-time-display",innerHTML:'Remaining Time -0:00',"aria-live":"off"});a.appendChild(this.u);return a};u.nb.prototype.fa=function(){this.c.duration()&&(this.u.innerHTML='Remaining Time -'+u.ya(this.c.duration()-this.c.currentTime()))};
u.Ia=u.s.extend({h:function(a,c){u.s.call(this,a,c)}});u.Ia.prototype.sa="Fullscreen";u.Ia.prototype.S=function(){return"vjs-fullscreen-control "+u.s.prototype.S.call(this)};u.Ia.prototype.q=function(){this.c.isFullscreen()?(this.c.exitFullscreen(),this.xb.innerHTML="Fullscreen"):(this.c.requestFullscreen(),this.xb.innerHTML="Non-Fullscreen")};u.mb=u.a.extend({h:function(a,c){u.a.call(this,a,c)}});u.mb.prototype.j={children:{seekBar:{}}};
u.mb.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};u.dc=u.Q.extend({h:function(a,c){u.Q.call(this,a,c);a.d("timeupdate",u.bind(this,this.ma));a.K(u.bind(this,this.ma))}});t=u.dc.prototype;t.j={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};t.Bc="timeupdate";t.e=function(){return u.Q.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
t.ma=function(){var a=this.c.$a?this.c.z.currentTime:this.c.currentTime();this.b.setAttribute("aria-valuenow",u.round(100*this.Db(),2));this.b.setAttribute("aria-valuetext",u.ya(a,this.c.duration()))};t.Db=function(){return this.c.currentTime()/this.c.duration()};t.Wa=function(a){u.Q.prototype.Wa.call(this,a);this.c.$a=f;this.Xd=!this.c.paused();this.c.pause()};t.Lb=function(a){a=J(this,a)*this.c.duration();a==this.c.duration()&&(a-=0.1);this.c.currentTime(a)};
t.Mb=function(a){u.Q.prototype.Mb.call(this,a);this.c.$a=l;this.Xd&&this.c.play()};t.Ic=function(){this.c.currentTime(this.c.currentTime()+5)};t.Hc=function(){this.c.currentTime(this.c.currentTime()-5)};u.jb=u.a.extend({h:function(a,c){u.a.call(this,a,c);a.d("progress",u.bind(this,this.update))}});u.jb.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'Loaded: 0%'})};
u.jb.prototype.update=function(){this.b.style&&(this.b.style.width=u.round(100*this.c.bufferedPercent(),2)+"%")};u.ac=u.a.extend({h:function(a,c){u.a.call(this,a,c)}});u.ac.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'Progress: 0%'})};u.Ka=u.Y.extend({h:function(a,c){u.Y.call(this,a,c);a.d("timeupdate",u.bind(this,this.fa))}});u.Ka.prototype.defaultValue="00:00";
u.Ka.prototype.e=function(){return u.Y.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};u.Ka.prototype.fa=function(){var a=this.c.$a?this.c.z.currentTime:this.c.currentTime();this.b.innerHTML=''+u.ya(a,this.c.duration())+""};u.pb=u.a.extend({h:function(a,c){u.a.call(this,a,c);a.g&&(a.g.n&&a.g.n.volumeControl===l)&&this.o("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.g.n&&a.g.n.volumeControl===l?this.o("vjs-hidden"):this.r("vjs-hidden")}))}});
u.pb.prototype.j={children:{volumeBar:{}}};u.pb.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};u.ob=u.Q.extend({h:function(a,c){u.Q.call(this,a,c);a.d("volumechange",u.bind(this,this.ma));a.K(u.bind(this,this.ma))}});t=u.ob.prototype;t.ma=function(){this.b.setAttribute("aria-valuenow",u.round(100*this.c.volume(),2));this.b.setAttribute("aria-valuetext",u.round(100*this.c.volume(),2)+"%")};
t.j={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};t.Bc="volumechange";t.e=function(){return u.Q.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};t.Lb=function(a){this.c.muted()&&this.c.muted(l);this.c.volume(J(this,a))};t.Db=function(){return this.c.muted()?0:this.c.volume()};t.Ic=function(){this.c.volume(this.c.volume()+0.1)};t.Hc=function(){this.c.volume(this.c.volume()-0.1)};
u.ic=u.a.extend({h:function(a,c){u.a.call(this,a,c)}});u.ic.prototype.e=function(){return u.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};u.qb=u.Y.extend();u.qb.prototype.defaultValue="00:00";u.qb.prototype.e=function(){return u.Y.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
u.ha=u.s.extend({h:function(a,c){u.s.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.g&&(a.g.n&&a.g.n.volumeControl===l)&&this.o("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.g.n&&a.g.n.volumeControl===l?this.o("vjs-hidden"):this.r("vjs-hidden")}))}});u.ha.prototype.e=function(){return u.s.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'Mute
'})};
u.ha.prototype.q=function(){this.c.muted(this.c.muted()?l:f)};u.ha.prototype.update=function(){var a=this.c.volume(),c=3;0===a||this.c.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.c.muted()?"Unmute"!=this.b.children[0].children[0].innerHTML&&(this.b.children[0].children[0].innerHTML="Unmute"):"Mute"!=this.b.children[0].children[0].innerHTML&&(this.b.children[0].children[0].innerHTML="Mute");for(a=0;4>a;a++)u.r(this.b,"vjs-vol-"+a);u.o(this.b,"vjs-vol-"+c)};
u.qa=u.L.extend({h:function(a,c){u.L.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.g&&(a.g.n&&a.g.n.Oc===l)&&this.o("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.g.n&&a.g.n.Oc===l?this.o("vjs-hidden"):this.r("vjs-hidden")}));this.o("vjs-menu-button")}});u.qa.prototype.va=function(){var a=new u.ga(this.c,{lc:"div"}),c=new u.ob(this.c,u.l.B({Wd:f},this.j.me));a.V(c);return a};u.qa.prototype.q=function(){u.ha.prototype.q.call(this);u.L.prototype.q.call(this)};
u.qa.prototype.e=function(){return u.s.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'Mute
'})};u.qa.prototype.update=u.ha.prototype.update;u.cc=u.L.extend({h:function(a,c){u.L.call(this,a,c);this.Nc();this.Mc();a.d("loadstart",u.bind(this,this.Nc));a.d("ratechange",u.bind(this,this.Mc))}});t=u.cc.prototype;
t.e=function(){var a=u.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'Playback Rate
'});this.yc=u.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.yc);return a};t.va=function(){var a=new u.ga(this.m()),c=this.m().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.V(new u.lb(this.m(),{rate:c[d]+"x"}));return a};
t.ma=function(){this.w().setAttribute("aria-valuenow",this.m().playbackRate())};t.q=function(){for(var a=this.m().playbackRate(),c=this.m().options().playbackRates,d=c[0],e=0;ea){d=c[e];break}this.m().playbackRate(d)};function fa(a){return a.m().g&&a.m().g.n.playbackRate&&a.m().options().playbackRates&&0',"aria-label":"play video"})};u.cb.prototype.q=function(){this.c.play()};u.hb=u.a.extend({h:function(a,c){u.a.call(this,a,c);this.update();a.d("error",u.bind(this,this.update))}});u.hb.prototype.e=function(){var a=u.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.u=u.e("div");a.appendChild(this.u);return a};
u.hb.prototype.update=function(){this.m().error()&&(this.u.innerHTML=this.m().error().message)};
u.t=u.a.extend({h:function(a,c,d){c=c||{};c.Fc=l;u.a.call(this,a,c,d);var e,g;g=this;e=this.m();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;g.d("mousedown",g.q);g.d("touchstart",function(c){c.preventDefault();a=this.c.userActive()});g.d("touchmove",function(){a&&this.m().reportUserActivity()});I(g);g.d("tap",g.Ed)}};c=u.bind(g,g.Id);this.K(a);e.d("controlsenabled",a);e.d("controlsdisabled",c)}});t=u.t.prototype;
t.Id=function(){this.p("tap");this.p("touchstart");this.p("touchmove");this.p("touchleave");this.p("touchcancel");this.p("touchend");this.p("click");this.p("mousedown")};t.q=function(a){0===a.button&&this.m().controls()&&(this.m().paused()?this.m().play():this.m().pause())};t.Ed=function(){this.m().userActive(!this.m().userActive())};t.Qb=m();t.n={volumeControl:f,fullscreenResize:l,playbackRate:l,progressEvents:l,timeupdateEvents:l};u.media={};u.media.bb="play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
function ha(){var a=u.media.bb[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.bb.length-1;0<=i;i--)u.t.prototype[u.media.bb[i]]=ha();
u.f=u.t.extend({h:function(a,c,d){this.n.volumeControl=u.f.ed();this.n.playbackRate=u.f.dd();this.n.movingMediaElementInDOM=!u.Tc;this.n.fullscreenResize=f;u.t.call(this,a,c,d);for(d=u.f.ib.length-1;0<=d;d--)u.d(this.b,u.f.ib[d],u.bind(this,this.nd));(c=c.source)&&this.b.currentSrc===c.src&&0'});e=u.l.B({data:a,width:"100%",height:"100%"},e);u.l.wa(e,function(a,c){k+=a+'="'+c+'" '});return'"};u.i.Rd=function(a,c){return a+"&"+c};
u.i.Jc=function(a){var c={wb:"",Rb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.wb=a.substring(0,d);c.Rb=a.substring(e,a.length);return c};u.i.vd=function(a){return a in u.i.Kc};u.i.Zc=/^rtmp[set]?:\/\//i;u.i.ud=function(a){return u.i.Zc.test(a)};
u.Yc=u.a.extend({h:function(a,c,d){u.a.call(this,a,c,d);if(!a.j.sources||0===a.j.sources.length){c=0;for(d=a.j.techOrder;c");this.aa.push(c)}this.la=2;this.k("loaded")};
function ra(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
t.update=function(){if(0=this.Ta||this.Ta===b?s=this.Ab!==b?this.Ab:0:(g=f,s=this.Hb!==b?this.Hb:c.length-1);for(;;){n=c[s];if(n.xa<=a)e=Math.max(e,n.xa),n.Ma&&(n.Ma=l);else if(a'+k[a].text+"";this.b.innerHTML=p;this.k("cuechange")}}};t.reset=function(){this.Ta=0;this.Pb=this.c.duration();this.Hb=this.Ab=0};u.Wb=u.C.extend();u.Wb.prototype.H="captions";u.ec=u.C.extend();u.ec.prototype.H="subtitles";u.Xb=u.C.extend();u.Xb.prototype.H="chapters";
u.gc=u.a.extend({h:function(a,c,d){u.a.call(this,a,c,d);if(a.j.tracks&&0=this.O.length&&this.G()}});u.U.prototype.ua=function(){var a=[],c;a.push(new u.kb(this.c,{kind:this.H}));for(var d=0;de.readyState()){this.be=e;e.d("loaded",u.bind(this,this.va));return}g=e;break}a=this.za=new u.ga(this.c);a.ia().appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.$(this.H),Sd:-1}));if(g){e=g.aa;for(var k,c=0,d=e.length;c https://javierbergia.com/wp-content/themes/themify-music/themify/js/bigvideo.js?ver=43e8de66e8f08d6267ba3f050717d13e
/* BigVideo by John Polacek @johnpolacek Licensed under MIT and GPL.
Dependencies: jQuery, jQuery UI (Slider), Video.js, ImagesLoaded */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'videojs',
'imagesloaded',
'jquery-ui'
], factory);
} else {
factory(jQuery, videojs);
}
})(function($, videojs) {
$.BigVideo = function(options, element) {
var defaults = {
// If you want to use a single mp4 source, set as true
useFlashForFirefox:true,
// If you are doing a playlist, the video won't play the first time
// on a touchscreen unless the play event is attached to a user click
forceAutoplay:false,
controls:false,
doLoop:true,
container: element ? $(element) : $('body'),
shrinkable:false
};
var BigVideo = this,
player,
vidEl = '.big-video-vid',
wrap = $(''),
video = $(''),
mediaAspect = 16/9,
vidDur = 0,
defaultVolume = 0.8,
isInitialized = false,
isSeeking = false,
isPlaying = false,
isQueued = false,
isAmbient = false,
playlist = [],
currMediaIndex,
currMediaType;
var settings = $.extend({}, defaults, options);
var container = settings.container;
var vid = container.find(vidEl);
function updateSize() {
var $body = $('body'),
$containerBVWrap = container.find('.big-video-wrap'),
windowW = $containerBVWrap.width(),
windowH = $containerBVWrap.height(),
windowAspect = windowW/windowH;
if ( settings.container.is( $body ) ) {
$( 'html,body' ).css( 'height', $( window ).height() > $body.css( 'height', 'auto' ).height() ? '100%' : 'auto' );
}
if (windowAspect < mediaAspect) {
// taller
if (currMediaType === 'video') {
player
.width(windowH*mediaAspect)
.height(windowH);
if (!settings.shrinkable) {
vid
.css('top',0)
.css('left',-(windowH*mediaAspect-windowW)/2)
.css('height',windowH);
} else {
vid
.css('top',-(windowW/mediaAspect-windowH)/2)
.css('left',0)
.css('height',windowW/mediaAspect);
}
container.find(vidEl+'_html5_api')
.css('width',windowH*mediaAspect)
.css('height',windowH);
container.find('object[id*=_flash_api]').parent()
.css('width',$(window).height()*mediaAspect)
.css('height',$(window).height());
container.find('video').css('width', '');
} else {
// is image
container.find('.big-video-image')
.css({
width: 'auto',
height: windowH,
top:0,
left:-(windowH*mediaAspect-windowW)/2
});
}
} else {
// wider
if (currMediaType === 'video') {
player
.width(windowW)
.height(windowW/mediaAspect);
vid
.css('top',-(windowW/mediaAspect-windowH)/2)
.css('left',0)
.css('height',windowW/mediaAspect);
container.find(vidEl+'_html5_api')
.css('width',container.find(vidEl+'_html5_api').parent().width()+"px")
.css('height','auto');
container.find('object[id*=_flash_api]').parent()
.css('width', $(window).width())
.css('height',$(window).width()/mediaAspect);
container.find('video').css('width', '100%');
} else {
// is image
container.find('.big-video-image')
.css({
width: windowW,
height: 'auto',
top:-(windowW/mediaAspect-windowH)/2,
left:0
});
}
}
}
function initPlayControl() {
// create video controller
var markup = [
''
].join('');
container.append(markup);
// hide until playVideo
container.find('.big-video-control-container').css('display','none');
container.find('.big-video-control-timer').css('display','none');
// add events
container.find('.big-video-control-track').slider({
animate: true,
step: 0.01,
slide: function(e,ui) {
isSeeking = true;
container.find('.big-video-control-progress').css('width',(ui.value-0.16)+'%');
player.currentTime((ui.value/100)*player.duration());
},
stop:function(e,ui) {
isSeeking = false;
player.currentTime((ui.value/100)*player.duration());
}
});
container.find('.big-video-control-bar').click(function(e) {
player.currentTime((e.offsetX/$(this).width())*player.duration());
});
container.find('.big-video-control-play').click(function(e) {
e.preventDefault();
playControl('toggle');
});
player.on('timeupdate', function() {
if (!isSeeking && (player.currentTime()/player.duration())) {
var currTime = player.currentTime();
var minutes = Math.floor(currTime/60);
var seconds = Math.floor(currTime) - (60*minutes);
if (seconds < 10) seconds='0'+seconds;
var progress = player.currentTime()/player.duration()*100;
container.find('.big-video-control-track').slider('value',progress);
container.find('.big-video-control-progress').css('width',(progress-0.16)+'%');
container.find('.big-video-control-timer').text(minutes+':'+seconds+'/'+vidDur);
}
});
}
function playControl(a) {
var action = a || 'toggle';
if (action === 'toggle') action = isPlaying ? 'pause' : 'play';
if (action === 'pause') {
player.pause();
container.find('.big-video-control-play').css('background-position','-16px');
isPlaying = false;
} else if (action === 'play') {
player.play();
container.find('.big-video-control-play').css('background-position','0');
isPlaying = true;
} else if (action === 'skip') {
nextMedia();
}
}
function setUpAutoPlay() {
player.play();
settings.container.off('click',setUpAutoPlay);
}
function nextMedia() {
currMediaIndex++;
if (currMediaIndex === playlist.length) currMediaIndex=0;
playVideo(playlist[currMediaIndex]);
}
function playVideo(source) {
// clear image
vid.css('display','block');
currMediaType = 'video';
player.src(source);
isPlaying = true;
if (isAmbient) {
container.find('.big-video-control-container').css('display','none');
player.ready(function(){
player.volume(0);
});
doLoop = true;
} else {
container.find('.big-video-control-container').css('display','block');
player.ready(function(){
player.volume(defaultVolume);
});
doLoop = true;
}
container.find('.big-video-image').css('display','none');
vid.css('display','block');
}
function showPoster(source) {
// remove old image
container.find('.big-video-image').remove();
// hide video
player.pause();
vid.css('display','none');
container.find('.big-video-control-container').css('display','none');
// show image
currMediaType = 'image';
var bgImage = $('');
wrap.append(bgImage);
container.find('.big-video-image').imagesLoaded(function() {
mediaAspect = container.find('.big-video-image').width() / container.find('.big-video-image').height();
updateSize();
});
}
BigVideo.init = function() {
if (!isInitialized) {
// create player
settings.container.prepend(wrap);
var autoPlayString = settings.forceAutoplay ? 'autoplay' : '';
player = $('');
player.css('position','absolute');
wrap.append(player);
vid = container.find(vidEl);
var videoTechOrder = ['html5','flash'];
// If only using mp4s and on firefox, use flash fallback
var ua = navigator.userAgent.toLowerCase();
var isFirefox = ua.indexOf('firefox') != -1;
if (settings.useFlashForFirefox && (isFirefox)) {
videoTechOrder = ['flash', 'html5'];
}
player = videojs(vid[0], {
controls:false,
autoplay:true,
preload:'auto',
techOrder:videoTechOrder
});
// add controls
if (settings.controls) initPlayControl();
// set initial state
updateSize();
isInitialized = true;
isPlaying = false;
if (settings.forceAutoplay) {
$('body').on('click', setUpAutoPlay);
}
container.find('object[id*=_flash_api]')
.attr('scale','noborder')
.attr('width','100%')
.attr('height','100%');
// set events
$(window).on('resize.bigvideo', function() {
updateSize();
});
player.on('loadedmetadata', function(data) {
if (container.find('object[id*=_flash_api]').length) {
// use flash callback to get mediaAspect ratio
mediaAspect =
container.find('object[id*=_flash_api]')[0].vjs_getProperty('videoWidth') /
container.find('object[id*=_flash_api]')[0].vjs_getProperty('videoHeight');
} else {
// use html5 player to get mediaAspect
mediaAspect =
container.find('video').prop('videoWidth') /
container.find('video').prop('videoHeight');
}
updateSize();
var dur = Math.round(player.duration());
var durMinutes = Math.floor(dur/60);
var durSeconds = dur - durMinutes*60;
if (durSeconds < 10) durSeconds='0'+durSeconds;
vidDur = durMinutes+':'+durSeconds;
});
player.on('ended', function() {
if (settings.doLoop) {
player.currentTime(0);
player.play();
}
if (isQueued) {
nextMedia();
}
});
}
};
BigVideo.show = function(source,options) {
if (options === undefined) options = {};
if (!source && container.data('video') !== '') {
source = container.data('video');
}
isAmbient = options.ambient === true;
if (isAmbient || options.doLoop) settings.doLoop = true;
if (typeof(source) === 'string') {
var ext = source.substring(source.lastIndexOf('.')+1);
if (ext === 'jpg' || ext === 'gif' || ext === 'png') {
showPoster(source);
} else {
if (options.altSource && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
source = options.altSource;
}
playVideo(source);
if (options.onShown) options.onShown();
isQueued = false;
}
} else {
playlist = source;
currMediaIndex = 0;
playVideo(playlist[currMediaIndex]);
if (options.onShown) options.onShown();
isQueued = true;
}
};
// Expose Video.js player
BigVideo.getPlayer = function() {
return player;
};
// Remove/dispose the player
BigVideo.remove = BigVideo.dispose = function() {
isInitialized = false;
wrap.remove();
$(window).off('resize.bigvideo');
if(player) {
player.off('loadedmetadata');
player.off('ended');
player.dispose();
}
};
// Expose BigVideoJS player actions play, pause, skip (if a playlist is available)
// Example: BigVideo.triggerPlayer('skip')
BigVideo.triggerPlayer = function(action){
playControl(action);
};
};
//jquery shim
$.fn.bigvideo = function (options) {
if (typeof options === 'string') {
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = $.data(this, 'bigvideo');
if (!instance) {
$.error('Cannot call methods on bigvideo prior to initialization; Attempted to call method "' + options + '"');
return;
}
if (!$.isFunction(instance[options]) || options.charAt(0) === '_') {
$.error('No such method "' + options + '" for bigvideo instance');
return;
}
instance[options].apply(instance, args);
});
} else {
this.each(function () {
$.data(this, 'bigvideo', new $.BigVideo(options, this));
});
}
return this;
};
});