如果打开的标签太多,Chrome HTML5视频会停止工作 - 内存问题? [英] Chrome HTML5 Videos stop working if too many tabs are open - Memory issue?

查看:385
本文介绍了如果打开的标签太多,Chrome HTML5视频会停止工作 - 内存问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery动态编写< video> 对象,并运行videojs来启动它们。播放视频后,有时当我再次播放时,它就无法播放,从那时起,即使在刷新页面后,也不会播放任何视频。每次,< video> 对象都会呈现,但视频无法播放。没有任何内容写入控制台。似乎没有任何错误。重新启动Chrome可以解决此问题,但只是暂时解决。播放几个视频后,问题又回来了。

I'm using jQuery to dynamically write <video> objects, and running videojs to init them. After I play a video, SOMETIMES when I try to play it again, it just won't play, and from that point on, even after refreshing the page, no videos will play. Each time, the <video> object renders, but the video just doesn't play. Nothing is written to the console. There don't appear to be any errors. Restarting Chrome resolves the issue, but only momentarily. After playing a few videos, the issue comes back again.

我发现关闭Chrome中的其他标签确实可以解决问题,因此它似乎是某种内存问题。

I found that closing other tabs in Chrome does indeed fix the problem, so it appears to be some kind of memory issue.

我正在运行Chrome 19.0.1084.46

I'm running Chrome 19.0.1084.46

推荐答案

你有多少视频标签?他们看起来怎么样?它们是否包括 preload ='none' 属性?源视频是否都在服务器上?

Exactly how many video tags to you have? What do they look like? Do they include preload='none' attribute? Are the source videos all on the server?

我问,因为如果你有超过六个视频标签单页指向同一源服务器,然后您可能遇到连接饥饿:

I ask because if you have more than six video tags on a single page pointing to the same source server then you could be experiencing "connection starvation":


  • Chrome只允许六个打开的连接到一台服务器(基于URL中的DNS名称)

  • html5 视频标记的预加载属性默认值为'auto '

  • Chrome的自动行为是预先加载一些数据并保持连接打开,为视频提取更多数据

  • Chrome allows only six open connections to a single server (based on DNS name in the URL)
  • the html5 video tag's preload attribute default value is 'auto'
  • Chrome's auto behavior is to preload some data and leave the connection open ready to pull more data for the video

因此,如果单个页面上的六个以上视频标签指向单个服务器,则视频将无法播放。要解决此特定问题,请将 preload 属性设置为'none'

So, with more than six video tags on a single page pointing to a single server, the videos will not play. To resolve this particular problem, set the preload attribute to 'none'

这篇关于如果打开的标签太多,Chrome HTML5视频会停止工作 - 内存问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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