1

I have a video that is dynamic and in its src property is a link like this:

blob:https://www.xxxxx.com/3e5431bc-2443-4651-b363-a386a73c8129

I need to create something for the user to click and from this click perform the video download. I can't use the html video tag download button.

NOTE: I tried this method but the downloaded video does not play.

JavaScript blob filename without link

Samuel Maia
  • 31
  • 1
  • 1
  • 4
  • Does this answer your question? [JavaScript blob filename without link](https://stackoverflow.com/questions/19327749/javascript-blob-filename-without-link) – Arkerone Dec 04 '19 at 19:15
  • @Arkerone The downloaded video cannot play with this method. – Samuel Maia Dec 04 '19 at 19:28

1 Answers1

4

If you actually had a full MP4 file at that URL, you could simply link to it.

<a href="blob:https://example.com/3e5431bc-2443-4651-b363-a386a73c8129" download>Download</a>

Since you said this doesn't work, I suspect that you don't actually have a blob, but the URL is referencing a MediaSource via Media Source Extensions. If that's the case, there is no generic way to reconstruct the video. You will need to figure out what mechanism is being used for streaming (like DASH or HLS) and reconstruct a video file yourself.

Brad
  • 159,648
  • 54
  • 349
  • 530