Mp4视频无法在iPad上播放 [英] Mp4 video won't play in the iPad

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

问题描述

美好的一天,我一直致力于这个项目并学习如何在ipad和所有其他浏览器上放置视频。

Good day, I've been working on this project and learning how to place a video on the ipad, and all the other browsers.

但写完之后对于这个代码,我注意到我从iPad获得的唯一内容是视频的第一个关键帧,但视频没有播放。当我按下ipad屏幕上显示的播放按钮时,视频不会播放。奇怪的是,脚本有一个autoplay命令。

But after writing the code for this, I noticed that the only thing I get from the iPad is the first keyframe of the video, but the video is not playing. When I press the "Play" button that appears in that screen of the ipad, the video won't just play. Weird is, the script has an autoplay command.

这个脚本有什么问题?有更好的方法吗?我花了太多时间在这上面,我无法完成它。我在Safari for Windows,Firefox,Internet Explorer上检查了这个,除了iPad之外它可以在任何地方使用。

What is wrong with this script ? Is there a better way of doing this ? I've spent way too much time on this and I can't get it done. I checked this on Safari for Windows, Firefox, Internet Explorer and it works everywhere except for the iPad.

<video controls width="920px" height="560px" autoplay>  
<!-- if Safari/Chrome-->  
<source src="video.mp4" type="video/mp4" /> 
<source src="video.ogv" type="video/ogg" /> 
<!--If the browser doesn't understand the <video> element, then reference a Flash file. You could also write something like "Use a Better Browser!" if you're feeling nasty. (Better to use a Flash file though.)-->  
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="920" height="560" id="csSWF">
                <param name="movie" value="video_controller.swf" />
                <param name="quality" value="best" />
                <param name="bgcolor" value="#1a1a1a" />
                <param name="allowfullscreen" value="true" />
                <param name="scale" value="showall" />
                <param name="allowscriptaccess" value="always" />
                <param name="flashvars" value="autostart=true&showstartscreen=false&color=0x1A1A1A,0x1A1A1A" />
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="video_controller.swf" width="920" height="560">
                    <param name="quality" value="best" />
                    <param name="bgcolor" value="#1a1a1a" />
                    <param name="allowfullscreen" value="true" />
                    <param name="scale" value="showall" />
                    <param name="allowscriptaccess" value="always" />
                    <param name="flashvars" value="autostart=true&showstartscreen=false&color=0x1A1A1A,0x1A1A1A" />
                <!--<![endif]-->
                    <div id="noUpdate">
                        <p>The video content presented here, requires a more recent version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.adobe.com/go/getflashplayer">downloading here</a>.</p>
                    </div>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>
            <script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
    swfobject.registerObject("csSWF", "9.0.28", "expressInstall.swf");
</script>
</video>


推荐答案

mp4视频的规格是什么(分辨率和简介)? iPad不支持所有类型的mp4。

What are the spec of the mp4 video (resolution and profile)?. The iPad doesn't support all the varieties of mp4.

你是否尝试过一个没有flash和ogv的简单html来源?

Did you try a simple html without the flash and the ogv source?

看起来像你的sepc:

It looks like your over sepc:


  • H.264视频(最高720p,每秒30帧;带有AAC-LC音频的主配置文件级别3.1至160 Kbps,48kHz,.m4v,.mp4和.mov文件格式的立体声音频)

  • MPEG-4视频,最高2.5 Mbps, 640 x 480像素,每秒30帧,简单配置文件,AAC-LC音频,最高160 Kbps,48kHz,立体声音频,.m4v,.mp4和.mov文件格式。

  • H.264 video (up to 720p, 30 frames per second; main profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats)
  • MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.

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

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