Home Get Audio as blob once loaded
Reply: 0

Get Audio as blob once loaded

user678 Published in August 16, 2018, 6:17 am
var audio = new Audio(); 

audio.onloadeddata = 
 // get as blob

audio.src = "http://somewebsite/somefile.mp3";

Is it possible to get an Audio element's data as a blob once it's been loaded?

I am aware I can load a file as a blob, and then assign it to an Audio element's source, but this is not what I am trying to achieve: the load-and-assign method can't leverage the built-in capability of audio element to play "as soon as possible" (see onCanPlaythrough event).

(Secondary question: do browsers usually cache audio files, if/once they are completely loaded, just as they do with images?)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.289125 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO