Home javascript blob - what and why?

blob – what and why?




Do not fully understand what Blob is in HTML … What can I do with him and why do you need? Examples if you can

Answer 1, Authority 100%

is a binary file, if we consider using it in HTML, not JS, then the example will be a link to the streams of video coming from your or someone else’s webcam (WeBRTC). Of course, we can encode the file in BASE64 and insert into the page, but if the file is generated (and not on the server) a big one or it stream, then this is already a problem and for this we insert the link to this object in memory, and not the path to the file or the data encoded in URL ie.:

var video = document.getelementbyid ("video");
video.src = window.url.createObjectURL (VID);

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions