HTML 5视频标记范围标题 [英] HTML 5 video tag range header

查看:130
本文介绍了HTML 5视频标记范围标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于加载视频的流式网络服务器。我还设置了一个简单的html页面,其中包含一个视频标签,用于请求视频内容。

I have a built a streaming web server for loading a video. I have also setup a simple html page with a video tag that requests the video content.

初始请求的标题如下:

Range:bytes=0-

在我的服务器上,我将范围的结尾设置为:

On my server I am setting the end of the range to:

Range:bytes=0-100000

这是有效的,html播放器使用以下标题请求内容的下一部分:

This works and the html player requests the next part of the content with the header of:

Range:bytes=100001-

然后返回其余内容。

如何获取html视频标记以请求正确的范围。

How do I get the html video tag to request the correct ranges.

推荐答案

您不会使浏览器请求正确范围。浏览器请求所需的范围。服务器必须响应它正确的范围请求。

You don’t make the browser request the "correct" range. The browser requests the ranges it needs. The server must respond to the range requests it makes correctly.

这篇关于HTML 5视频标记范围标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆