Module hilo/media/WebAudio
Requires
hilo/core/Hilo, hilo/core/Class, hilo/event/EventMixin
Source
WebAudio.js
WebAudio audio playing module. It provides a better way to play and control audio, use on iOS6+ platform.
Compatibility:iOS6+、Chrome33+、Firefox28+ supported,but all Android browsers do not support.
Property | Defined | |
---|---|---|
autoPlay:Boolean
Is the audio autoplay, default value is false.
|
WebAudio | |
duration:Number
The duration of the audio, readonly!
|
WebAudio | |
loaded:Boolean
Is the audio resource loaded, readonly!
|
WebAudio | |
loop:Boolean
Is loop playback, default value is false.
|
WebAudio | |
muted:Boolean
Is the audio muted, default value is false.
|
WebAudio | |
playing:Boolean
Is the audio playing, readonly!
|
WebAudio | |
src:String
The source of the playing audio.
|
WebAudio | |
volume:Number
The volume of the audio, value between 0 to 1.
|
WebAudio | |
static
|
WebAudio | |
static
|
WebAudio |
Method | Defined | |
---|---|---|
WebAudio(properties:Object)
Constructor
|
WebAudio | |
load()
|
WebAudio | |
pause()
|
WebAudio | |
play()
|
WebAudio | |
resume()
|
WebAudio | |
setMute(muted)
|
WebAudio | |
setVolume(volume)
|
WebAudio | |
stop()
|
WebAudio | |
enable()
static
|
WebAudio |