From 4a31401b64e1248c6885a4ce03477e8ae0e8b9a5 Mon Sep 17 00:00:00 2001 From: "mb.jquery.components" Date: Sat, 25 Jun 2016 14:58:11 +0200 Subject: [PATCH 1/2] added ogg as downloadable file --- bower.json | 2 +- dist/jquery.mb.miniAudioPlayer.js | 6 +++--- dist/jquery.mb.miniAudioPlayer.min.js | 8 ++++---- dist/skinMaker.html | 5 ++--- package.json | 2 +- src/dep/jquery.mb.browser.min.js | 2 +- src/jquery.mb.miniPlayer.src.js | 4 ++-- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/bower.json b/bower.json index 200f2ee..4230f07 100644 --- a/bower.json +++ b/bower.json @@ -21,5 +21,5 @@ "test", "tests" ], - "buildnum": "49882" + "buildnum": "49884" } \ No newline at end of file diff --git a/dist/jquery.mb.miniAudioPlayer.js b/dist/jquery.mb.miniAudioPlayer.js index 9f047c0..f0bac37 100644 --- a/dist/jquery.mb.miniAudioPlayer.js +++ b/dist/jquery.mb.miniAudioPlayer.js @@ -168,7 +168,7 @@ if (master.player.opt.addGradientOverlay) $controlsBox.addClass("gradientOverlay"); - var $layout = jQuery("
"); + var $layout = jQuery("
"); if (!jQuery("#JPLContainer").length) { var JPLContainer = jQuery("
").attr({id: "JPLContainer"}); @@ -179,7 +179,7 @@ $master.after($controlsBox); $controlsBox.html($layout); - master.player.fileUrl = encodeURI(master.player.opt.mp3 || master.player.opt.m4a); + master.player.fileUrl = encodeURI(master.player.opt.mp3 || master.player.opt.m4a || master.player.opt.ogg); var fileExtension = master.player.fileUrl.substr((Math.max(0, master.player.fileUrl.lastIndexOf(".")) || Infinity) + 1); //if there's a querystring remove it @@ -878,7 +878,7 @@ function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerC * ***************************************************************************** */ -var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt); +var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.androidStock=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")||-1!=nAgt.indexOf("Edge")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):nAgt.indexOf("mozilla/5.0")>-1&&nAgt.indexOf("android ")>-1&&nAgt.indexOf("applewebkit")>-1&&!(nAgt.indexOf("chrome")>-1)?(verOffset=nAgt.indexOf("Chrome"),jQuery.browser.webkit=!0,jQuery.browser.androidStock=!0,jQuery.browser.name="androidStock",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt); ;/* * Metadata - jQuery plugin for parsing metadata from elements * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan diff --git a/dist/jquery.mb.miniAudioPlayer.min.js b/dist/jquery.mb.miniAudioPlayer.min.js index 18dd63e..9c20c34 100644 --- a/dist/jquery.mb.miniAudioPlayer.min.js +++ b/dist/jquery.mb.miniAudioPlayer.min.js @@ -1,11 +1,11 @@ -/*jquery.mb.miniAudioPlayer 12-05-2016 +/*jquery.mb.miniAudioPlayer 25-06-2016 _ jquery.mb.components _ email: matteo@open-lab.com _ Copyright (c) 2001-2016. Matteo Bicocchi (Pupunzi); _ blog: http://pupunzi.open-lab.com _ Open Lab s.r.l., Florence - Italy */ -function y(a,b,c){function d(a,b,c,d,f,g){var h=e();h?("undefined"==typeof g&&(g=!0),b&&("undefined"!=typeof h.onload?h.onload=function(){"200"==h.status||"206"==h.status?(h.fileSize=f||h.getResponseHeader("Content-Length"),b(h)):c&&c(),h=q}:h.onreadystatechange=function(){4==h.readyState&&("200"==h.status||"206"==h.status?(h.fileSize=f||h.getResponseHeader("Content-Length"),b(h)):c&&c(),h=q)}),h.open("GET",a,g),h.overrideMimeType&&h.overrideMimeType("text/plain; charset=x-user-defined"),d&&h.setRequestHeader("Range","bytes="+d[0]+"-"+d[1]),h.setRequestHeader("If-Modified-Since","Sat, 1 Jan 1970 00:00:00 GMT"),h.send(q)):c&&c()}function e(){var a=q;return window.XMLHttpRequest?a=new XMLHttpRequest:window.F&&(a=new ActiveXObject("Microsoft.XMLHTTP")),a}function f(a,b){var c=e();c&&(b&&("undefined"!=typeof c.onload?c.onload=function(){"200"==c.status&&b(this),c=q}:c.onreadystatechange=function(){4==c.readyState&&("200"==c.status&&b(this),c=q)}),c.open("HEAD",a,!0),c.send(q))}function g(a,b){function e(a){var b=~~(a[0]/g)-h,a=~~(a[1]/g)+1+h;return 0>b&&(b=0),a>=blockTotal&&(a=blockTotal-1),[b,a]}function f(e,f){for(;l[e[0]];)if(e[0]++,e[0]>e[1])return void(f&&f());for(;l[e[1]];)if(e[1]--,e[0]>e[1])return void(f&&f());var h=[e[0]*g,(e[1]+1)*g-1];d(a,function(a){parseInt(a.getResponseHeader("Content-Length"),10)==b&&(e[0]=0,e[1]=blockTotal-1,h[0]=0,h[1]=b-1);for(var a={data:a.W||a.responseText,s:h[0]},c=e[0];c<=e[1];c++)l[c]=a;j+=h[1]-h[0]+1,f&&f()},c,h,i,!!f)}var g,h,i,j=0,k=new z("",0,b),l=[];g=g||2048,h="undefined"==typeof h?0:h,blockTotal=~~((b-1)/g)+1;for(var m in k)k.hasOwnProperty(m)&&"function"==typeof k[m]&&(this[m]=k[m]);this.a=function(a){var b;return f(e([a,a])),b=l[~~(a/g)],"string"==typeof b.data?255&b.data.charCodeAt(a-b.s):"unknown"==typeof b.data?IEBinary_getByteAt(b.data,a-b.s):void 0},this.N=function(){return j},this.f=function(a,b){f(e(a),b)}}!function(){f(a,function(c){c=parseInt(c.getResponseHeader("Content-Length"),10)||-1,b(new g(a,c))})}()}function z(a,b,c){var d=a,e=b||0,f=0;this.P=function(){return d},"string"==typeof a?(f=c||d.length,this.a=function(a){return 255&d.charCodeAt(a+e)}):"unknown"==typeof a&&(f=c||IEBinary_getLength(d),this.a=function(a){return IEBinary_getByteAt(d,a+e)}),this.n=function(a,b){for(var c=Array(b),d=0;b>d;d++)c[d]=this.a(a+d);return c},this.j=function(){return f},this.d=function(a,b){return 0!=(this.a(a)&1<127?a-256:a},this.r=function(a,b){var c=b?(this.a(a)<<8)+this.a(a+1):(this.a(a+1)<<8)+this.a(a);return 0>c&&(c+=65536),c},this.S=function(a,b){var c=this.r(a,b);return c>32767?c-65536:c},this.h=function(a,b){var c=this.a(a),d=this.a(a+1),e=this.a(a+2),f=this.a(a+3),c=b?(((c<<8)+d<<8)+e<<8)+f:(((f<<8)+e<<8)+d<<8)+c;return 0>c&&(c+=4294967296),c},this.R=function(a,b){var c=this.h(a,b);return c>2147483647?c-4294967296:c},this.q=function(a){var b=this.a(a),c=this.a(a+1),a=this.a(a+2),b=((b<<8)+c<<8)+a;return 0>b&&(b+=16777216),b},this.c=function(a,b){for(var c=[],d=a,e=0;a+b>d;d++,e++)c[e]=String.fromCharCode(this.a(d));return c.join("")},this.e=function(a,b,c){switch(a=this.n(a,b),c.toLowerCase()){case"utf-16":case"utf-16le":case"utf-16be":var d,b=c,e=0,f=1,c=0;d=Math.min(d||a.length,a.length),254==a[0]&&255==a[1]?(b=!0,e=2):255==a[0]&&254==a[1]&&(b=!1,e=2),b&&(f=0,c=1);for(var b=[],g=0;d>e;g++){var h=a[e+f],i=(h<<8)+a[e+c];if(e+=2,0==i)break;216>h||h>=224?b[g]=String.fromCharCode(i):(h=(a[e+f]<<8)+a[e+c],e+=2,b[g]=String.fromCharCode(i,h))}a=new String(b.join("")),a.g=e;break;case"utf-8":for(d=0,e=Math.min(e||a.length,a.length),239==a[0]&&187==a[1]&&191==a[2]&&(d=3),f=[],c=0;e>d&&(b=a[d++],0!=b);c++)128>b?f[c]=String.fromCharCode(b):b>=194&&224>b?(g=a[d++],f[c]=String.fromCharCode(((31&b)<<6)+(63&g))):b>=224&&240>b?(g=a[d++],i=a[d++],f[c]=String.fromCharCode(((255&b)<<12)+((63&g)<<6)+(63&i))):b>=240&&245>b&&(g=a[d++],i=a[d++],h=a[d++],b=((7&b)<<18)+((63&g)<<12)+((63&i)<<6)+(63&h)-65536,f[c]=String.fromCharCode((b>>10)+55296,(1023&b)+56320));a=new String(f.join("")),a.g=d;break;default:for(e=[],f=f||a.length,d=0;f>d&&(c=a[d++],0!=c);)e[d-1]=String.fromCharCode(c);a=new String(e.join("")),a.g=d}return a},this.M=function(a){return String.fromCharCode(this.a(a))},this.Z=function(){return window.btoa(d)},this.L=function(a){d=window.atob(a)},this.f=function(a,b){b()}}function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function setUnit(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+jQuery/)?""+a+b:a}function setFilter(a,b,c){var d=uncamel(b),e=jQuery.browser.mozilla?"":jQuery.CSS.sfx;a[e+"filter"]=a[e+"filter"]||"",c=setUnit(c>jQuery.CSS.filters[b].max?jQuery.CSS.filters[b].max:c,jQuery.CSS.filters[b].unit),a[e+"filter"]+=d+"("+c+") ",delete a[b]}!function(jQuery){jQuery.support.cors=!0;var map=map||{};jQuery.mbMiniPlayer={author:"Matteo Bicocchi",version:"1.8.3",name:"mb.miniPlayer",isMobile:!1,icon:{play:"P",pause:"p",stop:"S",rewind:"R",volume:"Vm",volumeMute:"Vm"},defaults:{ogg:null,m4a:null,width:150,skin:"black",volume:.5,autoplay:!1,animate:!0,id3:!1,playAlone:!0,loop:!1,inLine:!1,volumeLevels:12,allowMute:!0,showControls:!0,showVolumeLevel:!0,showTime:!0,showRew:!0,addShadow:!1,addGradientOverlay:!1,gaTrack:!0,downloadable:!1,downloadablesecurity:!1,downloadPage:null,swfPath:"swf/",pauseOnWindowBlur:!1,onReady:function(a,b){},onPlay:function(a){},onEnd:function(a){},onPause:function(a){},onMute:function(a){},onDownload:function(a){}},getID3:function(a){if(a.opt.id3||a.opt.m4a){var b=a.controlBox.find(".map_title"),c=a.opt.mp3||a.opt.m4a;c&&ID3.loadTags(c,function(){a.info=ID3.getAllTags(c),"undefined"!=typeof a.info.title&&"null"!=a.info.title&&b.html(a.info.title+" - "+a.info.artist)},{tags:["artist","title","album","year","comment","track","genre","lyrics","picture"],onError:function(a){"xhr"===a.error&&console.log("There was a network error: ",a.xhr)}})}},buildPlayer:function(options){return this.each(function(idx){var master=this;if(!master.isInit){master.isInit=!0;var $master=jQuery(master);$master.hide();var url=$master.attr("href"),playerID="mp_"+($master.attr("id")?$master.attr("id"):(new Date).getTime()),title=$master.html();if(jQuery.isAndroidDefault){var androidPlayer=jQuery("