1
0
Fork 0

Bump version

This commit is contained in:
Starbeamrainbowlabs 2017-07-31 19:19:09 +01:00
parent 52c0ce673c
commit 98a353b2a6
2 changed files with 2 additions and 2 deletions

View File

@ -46,4 +46,4 @@ function SoundBox() {
};
}
SoundBox.version = "0.2";
SoundBox.version = "0.2.1";

2
soundbox.min.js vendored
View File

@ -1 +1 @@
function SoundBox(){this.sounds={},this.load=function(a,b,c){return this.sounds[a]=new Audio(b),"function"==typeof c?void this.sounds[a].addEventListener("canplaythrough",c):new Promise((d,e)=>{this.sounds[a].addEventListener("canplaythrough",d),this.sounds[a].addEventListener("error",e)})},this.remove=function(a){"undefined"!=typeof this.sounds&&delete this.sounds[a],"function"==typeof this.sound_callbacks&&delete this.sound_callbacks[a]},this.play=function(a,b){if("undefined"==typeof this.sounds[a])return console.error("Can't find sound called '"+a+"'."),!1;var c=this.sounds[a].cloneNode(!0);return c.play(),"function"==typeof b?(c.addEventListener("ended",b),!0):new Promise(d=>c.addEventListener("ended",d))}}SoundBox.version="0.2";
function SoundBox(){this.sounds={},this.load=function(a,b,c){return this.sounds[a]=new Audio(b),"function"==typeof c?void this.sounds[a].addEventListener("canplaythrough",c):new Promise((d,e)=>{this.sounds[a].addEventListener("canplaythrough",d),this.sounds[a].addEventListener("error",e)})},this.remove=function(a){"undefined"!=typeof this.sounds&&delete this.sounds[a],"function"==typeof this.sound_callbacks&&delete this.sound_callbacks[a]},this.play=function(a,b){if("undefined"==typeof this.sounds[a])return console.error("Can't find sound called '"+a+"'."),!1;var c=this.sounds[a].cloneNode(!0);return c.play(),"function"==typeof b?(c.addEventListener("ended",b),!0):new Promise(d=>c.addEventListener("ended",d))}}SoundBox.version="0.2.1";