I have a video that is dynamic and in its src property is a link like this:
blob:
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
I have a video that is dynamic and in its src property is a link like this:
blob:https://www.xxxxx./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
Share Improve this question edited Dec 4, 2019 at 19:30 Samuel Maia asked Dec 4, 2019 at 19:11 Samuel MaiaSamuel Maia 411 gold badge1 silver badge4 bronze badges 2- Does this answer your question? JavaScript blob filename without link – Arkerone Commented Dec 4, 2019 at 19:15
- @Arkerone The downloaded video cannot play with this method. – Samuel Maia Commented Dec 4, 2019 at 19:28
1 Answer
Reset to default 4If you actually had a full MP4 file at that URL, you could simply link to it.
<a href="blob:https://example./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.