ios10野生动物园的html页面中视频元素是否有限制 [英] is there a limit of video elements in an html page on ios10 safari

查看:84
本文介绍了ios10野生动物园的html页面中视频元素是否有限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于显示gif的html页面.我想通过将这些GIF转换为视频来对其进行优化.我将它们设为静音,设置为"displayinline"和自动播放".

I have a html page which is use to display gifs. I want to optimize it by converting those gifs to video. I make them muted , set 'displayinline' and 'autoplay'.

我在装有ios 10野生动物园的iPhone上进行了测试; 但是奇怪的是,当视频数量大于16(也许)时,其中一些(处于随机位置)会变成一个空的正方形.我为每个视频都设置了相同的"src"值,但未更改任何内容.

I tested it on an iphone with ios 10 safari; But it is strange that when the number of videos is large than 16(maybe) , some of them (at a random position) will become an empty square. I set every video with the same 'src' value , not thing changed.

所以,我想知道ios Safari的html页面中的视频数量是否受限制?

So, I wonder is there a limit of videos in a html page in ios safari?

<html>
<body>
<style>
video{
  width:100%;
  margin-bottom: 20px;
}
</style>
<p>
<video src="http://dev.mediapool.fi/demot/iosvideo/puuvideo.mp4" muted loop playsinline  autoplay></video>
</p>
<p>
<video src="http://dev.mediapool.fi/demot/iosvideo/puuvideo.mp4" muted loop playsinline  autoplay></video>
</p>
<!--....same video repeat 20 times -->
</body>
</html>

推荐答案

这已经很老了;但是,简短的答案是是的,有一个极限."

This is very old; however, the short answer is "yes, there is a limit."

这完全取决于设备,您的ios版本和魔术的某种组合,但是您不能在ios的单个页面中添加超过 x 个视频.前 x 个视频会正常加载;随后添加到页面的视频将永远不会在0之后出现readyState,并且将永远不会加载和播放.我见过 x 低至4个元素,高至16个元素.

It totally depends on some combination of your device, your ios version and magic, but you cannot add more than x videos to a single page in ios. the first x videos will load just fine; subsequent videos added to the page will never get a readyState past 0, and will never load, and will never play. I've seen x as low as 4 elements and as high as 16 elements.

我希望我可以更具体地介绍视频元素的数量,甚至是原因(我们可以假设原因,但没有官方答案).

I wish I could be more specific with you about the number of video elements, or even the why (we can assume why but there is no official answer).

这篇关于ios10野生动物园的html页面中视频元素是否有限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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