简体   繁体   English

从 blob url 下载 video.mp4

[英]Download a video.mp4 from blob url

I have a video that is dynamic and in its src property is a link like this:我有一个动态视频,它的src属性中有一个这样的链接

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.无法使用html视频标签下载按钮。

NOTE: I tried this method but the downloaded video does not play.注意:我尝试了这种方法,但下载的视频无法播放。

JavaScript blob filename without link 没有链接的 JavaScript blob 文件名

If you actually had a full MP4 file at that URL, you could simply link to it.如果您在该 URL 上确实有一个完整的 MP4 文件,您可以简单地链接到它。

<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.既然你说这不起作用,我怀疑你实际上没有 blob,但 URL 通过 Media Source Extensions 引用 MediaSource。 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.您将需要弄清楚用于流式传输的机制(如 DASH 或 HLS)并自己重建视频文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM