I have a page with many elements in it arranged one after the other.
我有一个页面,其中有许多
元素一个接一个地排列。
Lets says 100 for now. When I click on the web page, Chrome loads the first 25 and I can see the video images displayed Ok, but then it stops and the rest remain black. I also see the page is still loading, and I see chrome saying "In progress..." on the lower left side of the page.
Now here is the interesting thing I found. When I load the page using file:///C:/ URI, and use the same exact page, then now Chrome shows all the video elements just fine! None of them is black. They all display fine and I can play them with no problem.
I know it is a buffering issue since if I move one of the videos still showing black and put the link at the top of the page, and reload the page, then it is no longer black and it shows up. Nothing changed except the position of the tag. So it seems Chrome has a limit of how many video tags it can load in one page?
I tried to change the size of the video displayed using:
我尝试使用以下方法更改显示的视频大小:
video {
width: 200px !important;
height: auto !important;
}
But no matter what size I use in the above, it still hangs in the same place.
但无论我在上面使用什么尺寸,它仍然挂在同一个地方。
Any suggestions what to do? I could split the web page into many different pages as last resort.
有什么建议吗?我可以将网页分成许多不同的页面作为最后的手段。
This is windows 7, 64 bit. The video elements I use are all the same. Here is one example
这是Windows 7,64位。我使用的视频元素都是一样的。这是一个例子
As I said, changing the width and height makes no difference.
正如我所说,改变宽度和高度没有区别。
I looked at the log file for apache (access log file) and I see some 206 codes in there when I load the page from Chrome (206 is partial content). Here is example of one entry:
[11/Aug/2014:13:17:25 -0500] "GET /my_notes/movie.webm HTTP/1.1" 206 1768659
"http://localhost/my_notes/index.htm" "Mozilla/5.0 (Windows NT 6.1; WOW64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
When I load the same page from firefox and look at the apache log file, I do not see any 206 codes in there. From http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html it says:
The server has fulfilled the partial GET request for the resource. The request MUST have included a Range header field (section 14.35) indicating the desired range, and MAY have included an If-Range header field (section 14.27) to make the request conditional.
So it sounds like Chrome has a limit of the video it can request? Is this a known issue with Chrome?
所以听起来Chrome有可能要求的视频限制?这是Chrome的已知问题吗?
2 个解决方案
#1
20
I found a solution that bypass this Chrome issue. Posting here in case someone else runs into the same problem.
我找到了一个绕过这个Chrome问题的解决方案。发布此处以防其他人遇到同样的问题。
Replaced All the
全部取代了
....
with
同
What the above does is suggest to the browser not to download the videos unless one clicks on the play button, then only that specific video is loaded. It places a poster image meanwhile so that the space is occupied by something and not empty.