Sound
Represents the resource of an audio asset.
Summary
Properties
audio | If the Web Audio API is not supported this contains the audio data. |
buffer | If the Web Audio API is supported this contains the audio data. |
duration | Gets the duration of the sound. |
Details
Constructor
Sound(resource)
Create a new Sound instance.
Parameters
resource | HTMLAudioElement, AudioBuffer | If the Web Audio API is supported, pass an AudioBuffer object, otherwise an Audio object. |