Module hilo/media/WebSound
Requires
hilo/media/HTMLAudio, hilo/media/WebAudio, hilo/util/util
Source
WebSound.js
Audio playing manager.
demo:
var audio = WebSound.getAudio({ src: 'test.mp3', loop: false, volume: 1 }).on('load', function(e){ console.log('load'); }).on('end', function(e){ console.log('end'); }).play();
Method | Defined | |
---|---|---|
static
Activate audio function.
|
WebSound | |
getAudio(source:String|Object, preferWebAudio:Boolean):WebAudio|HTMLAudio
static
Get audio element.
|
WebSound | |
removeAudio(source:String|Object)
static
Remove audio element.
|
WebSound |