In Blob-supporting browsers , you can do the following and use the generated file specified reqis new XMLHttpRequest:
var some_video_element = ...;
req.onload = function () {
var blob_uri = URL.createObjectURL(this.response);
some_video_element.appendChild(document.createElement("source"))
.src = blob_uri;
};
req.responseType = "blob";
req.open(...);
req.send(null);
See the workaround for Google Chrome before responseType = "blob".
source
share