diff --git a/css/player.css b/css/player.css deleted file mode 100644 index f44321a..0000000 --- a/css/player.css +++ /dev/null @@ -1,318 +0,0 @@ -/* - PLAYER -*/ - -.audioplayer -{ - - height: 2.5em; /* 40 */ - color: #fff; - text-shadow: 1px 1px 0 #000; - border: 1px solid #222; - position: relative; - z-index: 1; - background: #333; - width: 280px; - left: 9px; - top: 5px; -} - -/* player elements: play/pause and volume buttons, played/duration timers, progress bar of loaded/played */ - -.audioplayer > div -{ - position: absolute; -} - - -/* play/pause button */ - -.audioplayer-playpause -{ - width: 2.5em; /* 40 */ - height: 100%; - text-align: left; - text-indent: -9999px; - cursor: pointer; - z-index: 2; - top: 0; - left: 0; -} -.audioplayer:not(.audioplayer-mini) .audioplayer-playpause -{ - border-right: 1px solid #555; - border-right-color: rgba( 255, 255, 255, .1 ); -} -.audioplayer-mini .audioplayer-playpause -{ - width: 100%; -} -.audioplayer-playpause:hover, -.audioplayer-playpause:focus -{ - background-color: #222; -} -.audioplayer-playpause a -{ - display: block; -} -.audioplayer-stopped .audioplayer-playpause a -{ - width: 0; - height: 0; - border: 0.5em solid transparent; /* 8 */ - border-right: none; - border-left-color: #fff; - content: ''; - position: absolute; - top: 50%; - left: 50%; - margin: -0.5em 0 0 -0.25em; /* 8 4 */ -} -.audioplayer-playing .audioplayer-playpause a -{ - width: 0.75em; /* 12 */ - height: 0.75em; /* 12 */ - position: absolute; - top: 50%; - left: 50%; - margin: -0.375em 0 0 -0.375em; /* 6 */ -} -.audioplayer-playing .audioplayer-playpause a:before, -.audioplayer-playing .audioplayer-playpause a:after -{ - width: 40%; - height: 100%; - background-color: #fff; - content: ''; - position: absolute; - top: 0; -} -.audioplayer-playing .audioplayer-playpause a:before -{ - left: 0; -} -.audioplayer-playing .audioplayer-playpause a:after -{ - right: 0; -} - - -/* timers */ - -.audioplayer-time -{ - width: 4.375em; /* 70 */ - height: 100%; - line-height: 2.375em; /* 38 */ - text-align: center; - z-index: 2; - top: 0; -} -.audioplayer-time-current -{ - border-left: 1px solid #111; - border-left-color: rgba( 0, 0, 0, .25 ); - left: 2.5em; /* 40 */ -} -.audioplayer-time-duration -{ - border-right: 1px solid #555; - border-right-color: rgba( 255, 255, 255, .1 ); - right: 2.5em; /* 40 */ -} -.audioplayer-novolume .audioplayer-time-duration -{ - border-right: 0; - right: 0; -} - - -/* progress bar of loaded/played */ - -.audioplayer-bar -{ - height: 0.875em; /* 14 */ - background-color: #222; - cursor: pointer; - z-index: 1; - top: 50%; - right: 6.875em; /* 110 */ - left: 6.875em; /* 110 */ - margin-top: -0.438em; /* 7 */ -} -.audioplayer-novolume .audioplayer-bar -{ - right: 4.375em; /* 70 */ -} -.audioplayer-bar div -{ - width: 0; - height: 100%; - position: absolute; - left: 0; - top: 0; -} -.audioplayer-bar-loaded -{ - background-color: #333; - z-index: 1; -} -.audioplayer-bar-played -{ - background: #007fd1; - z-index: 2; -} - - -/* volume button */ - -.audioplayer-volume -{ - width: 2.5em; /* 40 */ - height: 100%; - border-left: 1px solid #111; - border-left-color: rgba( 0, 0, 0, .25 ); - text-align: left; - text-indent: -9999px; - cursor: pointer; - z-index: 2; - top: 0; - right: 0; -} -.audioplayer-volume:hover, -.audioplayer-volume:focus -{ - background-color: #222; -} -.audioplayer-volume-button -{ - width: 100%; - height: 100%; -} -.audioplayer-volume-button a -{ - width: 0.313em; /* 5 */ - height: 0.375em; /* 6 */ - background-color: #fff; - display: block; - position: relative; - z-index: 1; - top: 40%; - left: 35%; -} -.audioplayer-volume-button a:before, -.audioplayer-volume-button a:after -{ - content: ''; - position: absolute; -} -.audioplayer-volume-button a:before -{ - width: 0; - height: 0; - border: 0.5em solid transparent; /* 8 */ - border-left: none; - border-right-color: #fff; - z-index: 2; - top: 50%; - right: -0.25em; - margin-top: -0.5em; /* 8 */ -} -.audioplayer:not(.audioplayer-muted) .audioplayer-volume-button a:after -{ - /* "volume" icon by Nicolas Gallagher, http://nicolasgallagher.com/pure-css-gui-icons */ - width: 0.313em; /* 5 */ - height: 0.313em; /* 5 */ - border: 0.25em double #fff; /* 4 */ - border-width: 0.25em 0.25em 0 0; /* 4 */ - left: 0.563em; /* 9 */ - top: -0.063em; /* 1 */ - -webkit-border-radius: 0 0.938em 0 0; /* 15 */ - -moz-border-radius: 0 0.938em 0 0; /* 15 */ - border-radius: 0 0.938em 0 0; /* 15 */ - -webkit-transform: rotate( 45deg ); - -moz-transform: rotate( 45deg ); - -ms-transform: rotate( 45deg ); - -o-transform: rotate( 45deg ); - transform: rotate( 45deg ); -} - - -/* CSS3 decorations */ -.audioplayer -{ - -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */ - -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */ - box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */ -} -.audioplayer-volume-adjust -{ - -webkit-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 ); - -moz-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 ); - box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 ); -} -.audioplayer-bar, -.audioplayer-volume-adjust > div -{ - -webkit-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 ); - -moz-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 ); - box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 ); -} -.audioplayer-volume-adjust div div, -.audioplayer-bar-played -{ - -webkit-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 ); - -moz-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 ); - box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 ); -} -.audioplayer-playpause, -.audioplayer-volume a -{ - -webkit-filter: drop-shadow( 1px 1px 0 #000 ); - -moz-filter: drop-shadow( 1px 1px 0 #000 ); - -ms-filter: drop-shadow( 1px 1px 0 #000 ); - -o-filter: drop-shadow( 1px 1px 0 #000 ); - filter: drop-shadow( 1px 1px 0 #000 ); -} -.audioplayer -{ - background: -webkit-gradient( linear, left top, left bottom, from( #444 ), to( #222 ) ); - background: -webkit-linear-gradient( top, #444, #222 ); - background: -moz-linear-gradient( top, #444, #222 ); - background: -ms-radial-gradient( top, #444, #222 ); - background: -o-linear-gradient( top, #444, #222 ); - background: linear-gradient( to bottom, #444, #222 ); -} -.audioplayer-bar-played -{ - background: -webkit-gradient( linear, left top, right top, from( #007fd1 ), to( #c600ff ) ); - background: -webkit-linear-gradient( left, #007fd1, #c600ff ); - background: -moz-linear-gradient( left, #007fd1, #c600ff ); - background: -ms-radial-gradient( left, #007fd1, #c600ff ); - background: -o-linear-gradient( left, #007fd1, #c600ff ); - background: linear-gradient( to right, #007fd1, #c600ff ); -} -.audioplayer-bar, -.audioplayer-bar div, -{ - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.audioplayer -{ - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.audioplayer *, -.audioplayer *:before, -.audioplayer *:after -{ - -webkit-transition: color .25s ease, background-color .25s ease, opacity .5s ease; - -moz-transition: color .25s ease, background-color .25s ease, opacity .5s ease; - -ms-transition: color .25s ease, background-color .25s ease, opacity .5s ease; - -o-transition: color .25s ease, background-color .25s ease, opacity .5s ease; - transition: color .25s ease, background-color .25s ease, opacity .5s ease; -} \ No newline at end of file diff --git a/css/player.min.css b/css/player.min.css deleted file mode 100644 index e9d72a7..0000000 --- a/css/player.min.css +++ /dev/null @@ -1 +0,0 @@ -.audioplayer{height:2.5em;color:#fff;text-shadow:1px 1px 0 #000;border:1px solid #222;position:relative;z-index:1;background:#333;width:280px;left:9px;top:5px;}.audioplayer > div{position:absolute;}.audioplayer-playpause{width:2.5em;height:100%;text-align:left;text-indent:-9999px;cursor:pointer;z-index:2;top:0;left:0;}.audioplayer:not(.audioplayer-mini) .audioplayer-playpause{border-right:1px solid #555;border-right-color:rgba( 255,255,255,.1 );}.audioplayer-mini .audioplayer-playpause{width:100%;}.audioplayer-playpause:hover,.audioplayer-playpause:focus{background-color:#222;}.audioplayer-playpause a{display:block;}.audioplayer-stopped .audioplayer-playpause a{width:0;height:0;border:0.5em solid transparent;border-right:none;border-left-color:#fff;content:'';position:absolute;top:50%;left:50%;margin:-0.5em 0 0 -0.25em;}.audioplayer-playing .audioplayer-playpause a{width:0.75em;height:0.75em;position:absolute;top:50%;left:50%;margin:-0.375em 0 0 -0.375em;}.audioplayer-playing .audioplayer-playpause a:before,.audioplayer-playing .audioplayer-playpause a:after{width:40%;height:100%;background-color:#fff;content:'';position:absolute;top:0;}.audioplayer-playing .audioplayer-playpause a:before{left:0;}.audioplayer-playing .audioplayer-playpause a:after{right:0;}.audioplayer-time{width:4.375em;height:100%;line-height:2.375em;text-align:center;z-index:2;top:0;}.audioplayer-time-current{border-left:1px solid #111;border-left-color:rgba( 0,0,0,.25 );left:2.5em;}.audioplayer-time-duration{border-right:1px solid #555;border-right-color:rgba( 255,255,255,.1 );right:2.5em;}.audioplayer-novolume .audioplayer-time-duration{border-right:0;right:0;}.audioplayer-bar{height:0.875em;background-color:#222;cursor:pointer;z-index:1;top:50%;right:6.875em;left:6.875em;margin-top:-0.438em;}.audioplayer-novolume .audioplayer-bar{right:4.375em;}.audioplayer-bar div{width:0;height:100%;position:absolute;left:0;top:0;}.audioplayer-bar-loaded{background-color:#333;z-index:1;}.audioplayer-bar-played{background:#007fd1;z-index:2;}.audioplayer-volume{width:2.5em;height:100%;border-left:1px solid #111;border-left-color:rgba( 0,0,0,.25 );text-align:left;text-indent:-9999px;cursor:pointer;z-index:2;top:0;right:0;}.audioplayer-volume:hover,.audioplayer-volume:focus{background-color:#222;}.audioplayer-volume-button{width:100%;height:100%;}.audioplayer-volume-button a{width:0.313em;height:0.375em;background-color:#fff;display:block;position:relative;z-index:1;top:40%;left:35%;}.audioplayer-volume-button a:before,.audioplayer-volume-button a:after{content:'';position:absolute;}.audioplayer-volume-button a:before{width:0;height:0;border:0.5em solid transparent;border-left:none;border-right-color:#fff;z-index:2;top:50%;right:-0.25em;margin-top:-0.5em;}.audioplayer:not(.audioplayer-muted) .audioplayer-volume-button a:after{width:0.313em;height:0.313em;border:0.25em double #fff;border-width:0.25em 0.25em 0 0;left:0.563em;top:-0.063em;-webkit-border-radius:0 0.938em 0 0;-moz-border-radius:0 0.938em 0 0;border-radius:0 0.938em 0 0;-webkit-transform:rotate( 45deg );-moz-transform:rotate( 45deg );-ms-transform:rotate( 45deg );-o-transform:rotate( 45deg );transform:rotate( 45deg );}.audioplayer{-webkit-box-shadow:inset 0 1px 0 rgba( 255,255,255,.15 ),0 0 1.25em rgba( 0,0,0,.5 );-moz-box-shadow:inset 0 1px 0 rgba( 255,255,255,.15 ),0 0 1.25em rgba( 0,0,0,.5 );box-shadow:inset 0 1px 0 rgba( 255,255,255,.15 ),0 0 1.25em rgba( 0,0,0,.5 );}.audioplayer-volume-adjust{-webkit-box-shadow:-2px -2px 2px rgba( 0,0,0,.15 ),2px -2px 2px rgba( 0,0,0,.15 );-moz-box-shadow:-2px -2px 2px rgba( 0,0,0,.15 ),2px -2px 2px rgba( 0,0,0,.15 );box-shadow:-2px -2px 2px rgba( 0,0,0,.15 ),2px -2px 2px rgba( 0,0,0,.15 );}.audioplayer-bar,.audioplayer-volume-adjust > div{-webkit-box-shadow:-1px -1px 0 rgba( 0,0,0,.5 ),1px 1px 0 rgba( 255,255,255,.1 );-moz-box-shadow:-1px -1px 0 rgba( 0,0,0,.5 ),1px 1px 0 rgba( 255,255,255,.1 );box-shadow:-1px -1px 0 rgba( 0,0,0,.5 ),1px 1px 0 rgba( 255,255,255,.1 );}.audioplayer-volume-adjust div div,.audioplayer-bar-played{-webkit-box-shadow:inset 0 0 5px rgba( 255,255,255,.5 );-moz-box-shadow:inset 0 0 5px rgba( 255,255,255,.5 );box-shadow:inset 0 0 5px rgba( 255,255,255,.5 );}.audioplayer-playpause,.audioplayer-volume a{-webkit-filter:drop-shadow( 1px 1px 0 #000 );-moz-filter:drop-shadow( 1px 1px 0 #000 );-ms-filter:drop-shadow( 1px 1px 0 #000 );-o-filter:drop-shadow( 1px 1px 0 #000 );filter:drop-shadow( 1px 1px 0 #000 );}.audioplayer{background:-webkit-gradient( linear,left top,left bottom,from( #444 ),to( #222 ) );background:-webkit-linear-gradient( top,#444,#222 );background:-moz-linear-gradient( top,#444,#222 );background:-ms-radial-gradient( top,#444,#222 );background:-o-linear-gradient( top,#444,#222 );background:linear-gradient( to bottom,#444,#222 );}.audioplayer-bar-played{background:-webkit-gradient( linear,left top,right top,from( #007fd1 ),to( #c600ff ) );background:-webkit-linear-gradient( left,#007fd1,#c600ff );background:-moz-linear-gradient( left,#007fd1,#c600ff );background:-ms-radial-gradient( left,#007fd1,#c600ff );background:-o-linear-gradient( left,#007fd1,#c600ff );background:linear-gradient( to right,#007fd1,#c600ff );}.audioplayer-bar,.audioplayer-bar div{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.audioplayer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.audioplayer *,.audioplayer *:before,.audioplayer *:after{-webkit-transition:color .25s ease,background-color .25s ease,opacity .5s ease;-moz-transition:color .25s ease,background-color .25s ease,opacity .5s ease;-ms-transition:color .25s ease,background-color .25s ease,opacity .5s ease;-o-transition:color .25s ease,background-color .25s ease,opacity .5s ease;transition:color .25s ease,background-color .25s ease,opacity .5s ease;} \ No newline at end of file diff --git a/js/audioplayer.min.js b/js/audioplayer.min.js deleted file mode 100644 index ce3d5fc..0000000 --- a/js/audioplayer.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - By Osvaldas Valutis, www.osvaldas.info - Available for use under the MIT License -*/ - -(function(e,t,n,r){var i="ontouchstart"in t,s=i?"touchstart":"mousedown",o=i?"touchmove":"mousemove",u=i?"touchend":"mouseup",a=i?"touchcancel":"mouseup",f=function(e){var t=e/3600,n=Math.floor(t),r=e%3600/60,i=Math.floor(r),s=Math.ceil(e%3600%60);if(s>59){s=0;i=Math.ceil(r)}if(i>59){i=0;n=Math.ceil(t)}return(n==0?"":n>0&&n.toString().length<2?"0"+n+":":n+":")+(i.toString().length<2?"0"+i:i)+":"+(s.toString().length<2?"0"+s:s)},l=function(e){var t=n.createElement("audio");return!!(t.canPlayType&&t.canPlayType("audio/"+e.split(".").pop().toLowerCase()+";").replace(/no/,""))};e.fn.audioPlayer=function(t){var t=e.extend({classPrefix:"audioplayer",strPlay:"Play",strPause:"Pause",strVolume:"Volume"},t),n={},r={playPause:"playpause",playing:"playing",stopped:"stopped",time:"time",timeCurrent:"time-current",timeDuration:"time-duration",bar:"bar",barLoaded:"bar-loaded",barPlayed:"bar-played",volume:"volume",volumeButton:"volume-button",volumeAdjust:"volume-adjust",noVolume:"novolume",muted:"muted",mini:"mini"};for(var u in r)n[u]=t.classPrefix+"-"+r[u];this.each(function(){if(e(this).prop("tagName").toLowerCase()!="audio")return false;var r=e(this),u=r.attr("src"),c=r.get(0).getAttribute("autoplay"),c=c===""||c==="autoplay"?true:false,h=r.get(0).getAttribute("loop"),h=h===""||h==="loop"?true:false,p=false;if(typeof u==="undefined"){r.find("source").each(function(){u=e(this).attr("src");if(typeof u!=="undefined"&&l(u)){p=true;return false}})}else if(l(u))p=true;var d=e('
'+(p?e("
").append(r.eq(0).clone()).html():'')+'
"),v=p?d.find("audio"):d.find("embed"),v=v.get(0);if(p){d.find("audio").css({width:0,height:0,visibility:"hidden"});d.append('
');var m=d.find("."+n.bar),g=d.find("."+n.barPlayed),y=d.find("."+n.barLoaded),b=d.find("."+n.timeCurrent),w=d.find("."+n.timeDuration),E=d.find("."+n.volumeButton),S=d.find("."+n.volumeAdjust+" > div"),x=0,T=function(e){theRealEvent=i?e.originalEvent.touches[0]:e;v.currentTime=Math.round(v.duration*(theRealEvent.pageX-m.offset().left)/m.width())},N=function(e){theRealEvent=i?e.originalEvent.touches[0]:e;v.volume=Math.abs((theRealEvent.pageY-(S.offset().top+S.height()))/S.height())},C=function(){var e=setInterval(function(){if(v.buffered.length<1)return true;y.width(v.buffered.end(0)/v.duration*100+"%");if(Math.floor(v.buffered.end(0))>=Math.floor(v.duration))clearInterval(e)},100)};var k=v.volume,L=v.volume=.111;if(Math.round(v.volume*1e3)/1e3==L)v.volume=k;else d.addClass(n.noVolume);w.html("…");b.html(f(0));v.addEventListener("loadeddata",function(){C();w.html(e.isNumeric(v.duration)?f(v.duration):"…");S.find("div").height(v.volume*100+"%");x=v.volume});v.addEventListener("timeupdate",function(){b.html(f(v.currentTime));g.width(v.currentTime/v.duration*100+"%")});v.addEventListener("volumechange",function(){S.find("div").height(v.volume*100+"%");if(v.volume>0&&d.hasClass(n.muted))d.removeClass(n.muted);if(v.volume<=0&&!d.hasClass(n.muted))d.addClass(n.muted)});v.addEventListener("ended",function(){d.removeClass(n.playing).addClass(n.stopped)});m.on(s,function(e){T(e);m.on(o,function(e){T(e)})}).on(a,function(){m.unbind(o)});E.on("click",function(){if(d.hasClass(n.muted)){d.removeClass(n.muted);v.volume=x}else{d.addClass(n.muted);x=v.volume;v.volume=0}return false});S.on(s,function(e){N(e);S.on(o,function(e){N(e)})}).on(a,function(){S.unbind(o)})}else d.addClass(n.mini);d.addClass(c?n.playing:n.stopped);d.find("."+n.playPause).on("click",function(){if(d.hasClass(n.playing)){e(this).attr("title",t.strPlay).find("a").html(t.strPlay);d.removeClass(n.playing).addClass(n.stopped);p?v.pause():v.Stop()}else{e(this).attr("title",t.strPause).find("a").html(t.strPause);d.addClass(n.playing).removeClass(n.stopped);p?v.play():v.Play()}return false});r.replaceWith(d)});return this}})(jQuery,window,document) \ No newline at end of file