Package Exports
- waud.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (waud.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
waud.js 
Web Audio Library
Installation
npm install waud.js
For haxe users:
haxelib install waud.js
API Documentation
coming soon
Issues
Found any bug? Please create a new issue.
Demo
Tested on:
| Device | OS | Browser |
|---|---|---|
| iPad 2 | 9+ | Safari, Chrome |
| iPad Mini | 9+ | Safari, Chrome |
| iPad Air 1 | 9+ | Safari, Chrome |
Usage
Haxe
class Main {
public function new() {
Waud.init();
var snd1 = new WaudSound("assets/loop", { autoplay: false, formats: ["mp3"], loop: true, volume: 1});
var snd2 = new WaudSound("assets/sound1.wav", {
autoplay: false,
loop: true,
onload: function (snd) { trace("loaded"); },
onend: function (snd) { trace("ended"); },
onerror: function (snd) { trace("error"); }
});
snd1.play();
snd2.play();
//Touch unlock event for iOS devices
Waud.touchUnlock = function() {
snd1.play();
snd2.play();
}
}
static function main() {
new Main();
}
}JavaScript
Waud.init();
var snd1 = new Waud.Sound("assets/loop", {
"autoplay": false, "formats": ["mp3"], "loop":true, "volume": 1
});
var snd2 = new Waud.Sound("assets/sound1.wav", {
"autoplay": false,
"loop":true,
"onload": function (snd) { console.log("loaded"); },
"onend": function (snd) { console.log("ended"); },
"onerror": function (snd) { console.log("error"); }
});
snd1.play();
snd2.play();
//Touch unlock event for iOS devices
Waud.touchUnlock = function() {
snd1.play();
snd2.play();
}Licensing Information
This content is released under the MIT License.