mirror of
https://github.com/sbrl/soundbox.git
synced 2018-01-10 21:33:43 +00:00
Bump version for v0.2.2
This commit is contained in:
parent
c2f92bedf4
commit
de3fe12c29
3 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sound-box",
|
"name": "sound-box",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"description": "A super simple JS library for playing sound effects and other audio. Now with button mashing support!",
|
"description": "A super simple JS library for playing sound effects and other audio. Now with button mashing support!",
|
||||||
"main": "soundbox.js",
|
"main": "soundbox.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -46,4 +46,4 @@ function SoundBox() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundBox.version = "0.2.1";
|
SoundBox.version = "0.2.2";
|
||||||
|
|
2
soundbox.min.js
vendored
2
soundbox.min.js
vendored
|
@ -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.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.2";
|
||||||
|
|
Loading…
Reference in a new issue