简体   繁体   English

HTML5 视频 — MP4 的限制缓冲区

[英]HTML5 Video — limiting buffer for an MP4

Is it possible to use an HTML5 Video tag to load an MP4, but control how much of the file is downloaded/buffered from the server (assume it supports byte ranges).是否可以使用 HTML5 视频标签加载 MP4,但控制从服务器下载/缓冲的文件量(假设它支持字节范围)。

Essentially, I'd like to be able to say "only download 60 seconds ahead" so I can avoid the browser downloading an entire 2 GB file when the user is going to end up bouncing anyway.本质上,我希望能够说“只提前 60 秒下载”,这样我就可以避免浏览器在用户无论如何都要跳出时下载整个 2 GB 的文件。

Answer: browsers will automatically buffer only what they need, rather than download the whole file.答:浏览器会自动只缓冲他们需要的内容,而不是下载整个文件。 It is not necessary to try and control the buffering from a "custom" HTML5 player POV.没有必要尝试从“自定义”HTML5 播放器 POV 控制缓冲。

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

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