AudioPlayer
new AudioPlayer(loop)
- Source:
Parameters:
| Name |
Type |
Description |
loop |
boolean
|
设置默认播放循环
|
Members
audio :HTMLAudioElement
- Source:
Type:
defaultLoop :boolean
- Source:
Type:
panTransition :Timer|null
- Source:
Type:
panner :StereoPannerNode
- Source:
Type:
reverb :ConvolverNode|null
- Source:
Type:
source :MediaElementAudioSourceNode
- Source:
Type:
-
MediaElementAudioSourceNode
volumeTransition :Timer|null
- Source:
Type:
Methods
play(guid, volumeopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
guid |
string
|
|
|
音频文件ID
|
volume |
number
|
<optional>
|
1
|
播放音量[0-1]
|
setLoop(loop)
- Source:
Parameters:
| Name |
Type |
Description |
loop |
boolean
|
循环播放
|
setPan(pan, easingIdopt, durationopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Description |
pan |
number
|
|
声像[-1~+1]
|
easingId |
string
|
<optional>
|
过渡曲线ID
|
duration |
number
|
<optional>
|
持续时间(毫秒)
|
setReverb(dry, wet, easingIdopt, durationopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Description |
dry |
number
|
|
干声增益[0-1]
|
wet |
number
|
|
湿声增益[0-1]
|
easingId |
string
|
<optional>
|
过渡曲线ID
|
duration |
number
|
<optional>
|
持续时间(毫秒)
|
setVolume(volume, easingIdopt, durationopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Description |
volume |
number
|
|
播放音量[0-1]
|
easingId |
string
|
<optional>
|
过渡曲线ID
|
duration |
number
|
<optional>
|
持续时间(毫秒)
|