Reputation: 18607
Can I somehow use a loaded audio tag to create an audio buffer?
I know that the web audio API has a decodeAudioData
method that can be used to create an audio buffer, but it does not accept an audio tag.
How can I take an audio tag and use it to create an audio buffer that can be played by a source node?
Upvotes: 1
Views: 334
Reputation: 163
Sadly, it doesn't look like the audio tag can be loaded into a buffer. The only way so far to create an AudioBuffer
is through XMLHttpRequest
or creating an empty buffer.
Upvotes: 2