HTML5视频元素请求会永久保留(在Chrome上) [英] HTML5 video element request stay pending forever (on chrome)

查看:181
本文介绍了HTML5视频元素请求会永久保留(在Chrome上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



每次我加载< video> 元素时, chrome将启动两个HTTP请求。

第一个将永久保留(我猜这是元数据,部分内容请求。是它保持挂起)



第二个到同一个文件是好的,并在加载结束后继续并关闭。



这里的问题是,第一个请求保持挂起状态直到关闭浏览器页面。因此,在某些情况下,如果我加载了多个视频,Chrome会中断并停止下载任何内容,因为每个可用请求都会被这些未决请求占用。



我创建了一个简化的测试用例这里: http://jsbin.com/ixifiq/3






我已经检查过重现此问题,并且 Video.js 和<一个href =http://mediaelementjs.com/> MediaElements.js 首页。加载页面时打开网络选项卡,您会看到第一个待处理的请求。然后按播放视频,你会看到第二个请求工作,但第一个请求将永远保持悬而未决。



有谁知道这个错误的修复?

解决方案

显然这是Chrome的一个漏洞。关于它的ATM没什么可做的。



我刚刚在Chromium项目中报告了这个问题,并且已经分配了它。希望它能在不久的将来得到修复。



错误报告: https://code.google.com/p/chromium/issues/detail?id=234779


I have a weird issue in Chrome.

Each time I load a <video> element, chrome will start two HTTP request.

The first one will stay pending forever (I guess this is the "meta-data", "partial content" request. But the point is that it stay pending)

The second one to the same file is ok and goes on and close after the loading is over.

The problem here is that the first request stay pending until I close the browser page. So at some point, if I load multiple video, Chrome will break and stop downloading anything because every available request is occupied by these pending requests.

I created a reduced test case here: http://jsbin.com/ixifiq/3


I've check to reproduce the issue, and it is happening on both Video.js and MediaElements.js frontpages. Open your network tab when loading the page, you'll see the first pending request. Then press play on the video, and you'll see the second request working, but the first one will stay pending forever.

Does anyone knows a fix to this bug?

解决方案

Apparently that's a bug from Chrome. And there's nothing to do about it ATM.

I reported the issue a while ago on the Chromium project and it's been assigned. So hopefully it'll be fixed in near future.

Bug report: https://code.google.com/p/chromium/issues/detail?id=234779

这篇关于HTML5视频元素请求会永久保留(在Chrome上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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