Antonin M. Antonin M. - 1 year ago 505
Javascript Question

Display a video from a Blob Javascript

I would like to display a video from a Javascript Blob/File object in the HTML5 video tag.

This code only works for small videos :

var reader = new FileReader();
reader.onload = function(e) {

I cannot use this for big videos (> 10MB).
Is there a solution to display a big video from a blob object in HTML 5?

Answer Source

I've found. It was so simple that I didnt even see it...

function display(vid){

    var video = document.getElementById("video");
    video.src = window.URL.createObjectURL(vid);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download