Reputation: 41
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
Upvotes: 2
Views: 20656
Reputation: 163262
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.
Upvotes: 4