An advanced audio add-on, which is powered by the Web Audio API, for highly performant, timing-sensitive sounds, suitable for games, and other advanced applications which need audio. It'll prob be about 3.2kb (minified and gzipped).
Works standalone (without Component), or you can attach it to Component as an add-on. If added to Component as an add-on, each component you create will have a .useAudio({ ... }) method attached to it when it's created and is then responsible for its own sounds only.
useAudio
An advanced audio add-on, which is powered by the Web Audio API, for highly performant, timing-sensitive sounds, suitable for games, and other advanced applications which need audio. It'll prob be about 3.2kb (minified and gzipped).
Works standalone (without Component), or you can attach it to Component as an add-on. If added to Component as an add-on, each component you create will have a
.useAudio({ ... })
method attached to it when it's created and is then responsible for its own sounds only.Simple standalone usage example:
It then allows you to use sound objects with the following methods (and more):
mySound.play()
mySound.pause()
mySound.stop()
mySound.settings({ ... })
- adjust all the sounds properties, even during playbackSee advanced usage and all the options here (for now): https://github.com/sc0ttj/component/blob/feature/audio/examples/usage-audio.html#L12
TO DO
<audio>
/<video>
Elements, to use their src as inputs