DEV Community

Discussion on: Download Any File from Blob

Collapse
 
nombrekeff profile image
Keff

You could try this:

downloadBlob(completeBlob, 'myvideo.mp4');
Enter fullscreen mode Exit fullscreen mode

Instead of:

downloadBlob(URL.createObjectURL(completeBlob), 'myvideo.mp4');
Enter fullscreen mode Exit fullscreen mode

I think it does not like the data returned from createObjectURL, as it expects a blob that returns a DOMString.

Collapse
 
gspteck profile image
GSPTeck

It works, but the length of the video is always 0 seconds.
How would I fix this?

Thread Thread
 
nombrekeff profile image
Keff

I guess that has something to do with how you create the video blob. If you share your code I can take a look and check if there is something wrong

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
nombrekeff profile image
Keff

Seems to be correct, as far as I can see.

can you see the video in any other way before converting to blob? Maybe in the page itself?

Thread Thread
 
gspteck profile image
GSPTeck

You can take a look at the full source code here: github.com/gspteck/RecScreen