From fc2043e1004a1cf0b5a04e775afa505fe944d23d Mon Sep 17 00:00:00 2001 From: IonDen Date: Fri, 29 May 2015 09:08:50 +0300 Subject: [PATCH] Update to 3.0.1 fix --- js/ion.sound.js | 2 +- js/ion.sound.min.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/ion.sound.js b/js/ion.sound.js index 120341b..8e2288d 100644 --- a/js/ion.sound.js +++ b/js/ion.sound.js @@ -30,7 +30,7 @@ } var d = $ && $("#debug"); - if (d.length) { + if (d && d.length) { var a = d.html(); d.html(a + text + '
'); } diff --git a/js/ion.sound.min.js b/js/ion.sound.min.js index 1c16089..1ed0575 100644 --- a/js/ion.sound.min.js +++ b/js/ion.sound.min.js @@ -1,7 +1,7 @@ // Ion.Sound | version 3.0.1 | https://github.com/IonDen/ion.sound -(function(k,e,m,r){k.ion=k.ion||{};if(!ion.sound){var l=function(a){a||(a="undefined");if(k.console){console.warn&&"function"===typeof console.warn?console.warn(a):console.log&&"function"===typeof console.log&&console.log(a);var b=m("#debug");if(b.length){var c=b.html();b.html(c+a+"
")}}},f=function(a,b){var c;b=b||{};for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};if("function"!==typeof Audio&&"object"!==typeof Audio)e=function(){l("HTML5 Audio is not supported in this browser")},ion.sound= -e,ion.sound.play=e,ion.sound.stop=e,ion.sound.pause=e,ion.sound.preload=e,ion.sound.destroy=e,e();else{e=/iPad|iPhone|iPod/.test(e.appVersion);var q=0,c={},d={},b;!c.supported&&e?c.supported=["mp3","mp4","aac"]:c.supported||(c.supported=["mp3","ogg","mp4","aac","wav"]);ion.sound=function(a){f(a,c);c.path=c.path||"";c.volume=c.volume||1;c.preload=c.preload||!1;c.multiplay=c.multiplay||!1;c.loop=c.loop||!1;c.sprite=c.sprite||null;c.scope=c.scope||null;c.ready_callback=c.ready_callback||null;c.ended_callback= -c.ended_callback||null;if(q=c.sounds.length)for(b=0;b")}}},f=function(a,b){var c;b=b||{};for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};if("function"!==typeof Audio&&"object"!==typeof Audio)e=function(){l("HTML5 Audio is not supported in this browser")}, +ion.sound=e,ion.sound.play=e,ion.sound.stop=e,ion.sound.pause=e,ion.sound.preload=e,ion.sound.destroy=e,e();else{e=/iPad|iPhone|iPod/.test(e.appVersion);var q=0,c={},d={},b;!c.supported&&e?c.supported=["mp3","mp4","aac"]:c.supported||(c.supported=["mp3","ogg","mp4","aac","wav"]);ion.sound=function(a){f(a,c);c.path=c.path||"";c.volume=c.volume||1;c.preload=c.preload||!1;c.multiplay=c.multiplay||!1;c.loop=c.loop||!1;c.sprite=c.sprite||null;c.scope=c.scope||null;c.ready_callback=c.ready_callback||null; +c.ended_callback=c.ended_callback||null;if(q=c.sounds.length)for(b=0;b=this.end&&this.playing&&(this.stop(),this._ended())},ended:function(){this.playing&&(this.stop(),this._ended())},_ended:function(){this.playing=!1;var a={name:this.name,alias:this.alias,part:this.sprite_part,start:this.start,duration:this.end};this.ended_callback&&"function"===typeof this.ended_callback&&this.ended_callback.call(this.scope,a);this.loop&&setTimeout(this.looper.bind(this),15)},looper:function(){this.loop--;this.play()}, -clear:function(){this.paused_time=this.played_time=this.start_time=0},setVolume:function(a){this.volume=a.volume;this.sound&&(this.sound.volume=this.volume)}})}}})(window,navigator,jQuery||$); +clear:function(){this.paused_time=this.played_time=this.start_time=0},setVolume:function(a){this.volume=a.volume;this.sound&&(this.sound.volume=this.volume)}})}}})(window,navigator,window.jQuery||window.$); \ No newline at end of file