For some small hacking project I would like to load the raw data of an MP3 into an ArrayBuffer.
<audio src="http://xyz.com/test.mp3">
I know that there are some basic functions exposed by an <audio>
element but I was not able to find what I'm looking for. It is very likely that if there is such thing it is part of the Web Audio API and only works in Chrome by now.
You cannot access raw data of HTML5 <audio>
element.
What you can do is
Load data via AJAX
Grab raw data from the result for your internal purposes
Pass data forward to audio element (probably need to do data-uri here)
But for this kind on manipulation I recommend using Web Audio API instead of <audio>
:
http://www.html5rocks.com/en/tutorials/webaudio/intro/
Firefox support should land in few iterations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With