HTML5视频无法在iPad上显示 [英] HTML5 Video Not Displaying on iPad

查看:361
本文介绍了HTML5视频无法在iPad上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 http://www.theparkerpalmsprings.com 上编写了一些视频,以便在使用HTML5时播放通过iPhone或iPad加载。在我的测试中,一切都按照预期在iPhone上查看网站(我在3G和iPhone 4上测试过),但在iPad上加载时,Quicktime徽标快速闪烁,然后没有任何反应。这是视频编码的问题还是我做错其他的事情?任何输入都将非常感谢!

I've encoded a few videos on http://www.theparkerpalmsprings.com to play using HTML5 when loaded via an iPhone or iPad. In my testing, everything works as expected when viewing the site on an iPhone (I've tested on a 3G and iPhone 4), but when loading on the iPad the Quicktime logo flashes quickly and then nothing happens. Is this a problem with the encoding of the videos or am I doing something else incorrectly? Any input would be greatly appreciated!

一些测试链接(直接到视频页面):

A few test links (directly to pages with video):

< a href =http://theparkerpalmsprings.com/spa/ =noreferrer> http://theparkerpalmsprings.com/spa/ (iPad上的大视频,iPhone上的小视频)
http://theparkerpalmsprings.com/rooms/estate.php (两个平台的小视频)

http://theparkerpalmsprings.com/spa/ (large video on iPad, small video on iPhone) http://theparkerpalmsprings.com/rooms/estate.php (small video for both platforms)

推荐答案

答案非常简单,这就是它被忽视的原因:

The answer was incredibly simple, which is why it was overlooked:

iPad要求您在视频标签中包含controls属性,否则无法开始播放视频,这与iPhone上的所有HTML5视频元素上都会出现一个大的播放按钮不同。视频都已正确编码,但这个简单的标签被跳过了。希望这可以帮助别人解决它给我带来的麻烦。

The iPad requires you to include the "controls" attribute in the video tag, otherwise there's no way for it to start playback of the video, unlike on the iPhone, where a large play button appears over all HTML5 video elements. The videos were all encoded properly but this simple tag was skipped over. Hopefully this will save someone the headache it caused me.

这篇关于HTML5视频无法在iPad上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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