I know you can store images as blob data and then have that blob data put within an image tag, which will display as it would with a regular image file. Is this possible with audio as well? I want to do this because I want it so that the audio is recorded, saved as blob data, and then sent to a server where then other users can access that blob data and replay the audio simply from that blob data.
1 Answer
Yes, it is also possible with Audio - in browsers that implement Blob URLs, anyway.
The browser simply (and universally) knows how to 'read' blob URLs, as it does any valid URL. Only, instead of making a request it accesses the local blob cache.
Data URLs work in the same manner and are probably easier to use when 'transferring data from the server' - as their name implies they contain all the data embedded within the URL. For downloading previously shared content, consider keeping the Audio stream a separate resource and using normal URLs / resources.
Anyway, for the details like how to actually capture the data, see Capturing Audio & Video in HTML5.
data:url for every element.