Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download Audio from AJAX and Play as Blob
var a = fetch("http://path/to/audio.wav")
.then(res => {
var reader = res.body.getReader();
return => {
return result;
.then(data => {
var blob = new Blob([data.value], { type: "audio/wav" });
var blobUrl = URL.createObjectURL(blob); = new Audio(); = blobUrl; = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.