admin管理员组文章数量:1335380
I want to randomly seek to different points in a ~30 minute video every 30 seconds. The filesize will be 100mb. When I seek does the player start loading from that point or does it have to load the entire file and then find that time within it?
I want to randomly seek to different points in a ~30 minute video every 30 seconds. The filesize will be 100mb. When I seek does the player start loading from that point or does it have to load the entire file and then find that time within it?
Share Improve this question asked Mar 22, 2015 at 18:21 TomTom 1,5652 gold badges22 silver badges45 bronze badges 1- 1 based on this it seems like you can, if the video metadata has been loaded, so the browser already knows the video size so it can ask the server to start loading from a different position, and the server knows how to honour partial data transfer requests. The fastest way to find out, of course, is to simply give it a try on a test URL and see what happens for your setup. – Mike 'Pomax' Kamermans Commented Mar 22, 2015 at 18:28
2 Answers
Reset to default 10It depends on the browser. If we are talking about a modern browser then when you seek, they will typically send a new http request to the server containing a Range:
header, indicating what "chunk" of the file they want to load. This would only be for a browser utilizing http 1.1 or higher. I think if the browser supports html5 video then you can be fairly certain that they will be using http 1.1. Keep in mind though that the client will typically always be loading something. So if you seek to 5 seconds into the vid it will essentially start loading the entire thing again until another seek happens.
No, it starts loading from the given timestamp, as long as the browser knows the duration of the video.
本文标签: javascriptDoes seeking an HTML5 video require loading the whole fileStack Overflow
版权声明:本文标题:javascript - Does seeking an HTML5 video require loading the whole file? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742246621a2439955.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论