在iPhone 3GS和iPhone 4上嵌入用于Mobile Safari的HTML5视频 [英] Embedding HTML5 video for Mobile Safari on an iPhone 3GS vs an iPhone 4

查看:162
本文介绍了在iPhone 3GS和iPhone 4上嵌入用于Mobile Safari的HTML5视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器上的mp4文件中有一个H.264 / AAC编码的视频,mime类型的视频/ mp4被添加到Web服务器(IIS 7),我有一个带有视频标签的页面:

I have an H.264/AAC encoded video in an mp4 file on the server, the mime-type video/mp4 is added to the web server (IIS 7), and I have a page with a video tag:

<video id="html5-video" width="360" height="202" poster="/images/poster.png" controls>
    <source src="/video/Web-360x202-14MB.mp4" type="video/mp4">
</video>

适用于iPhone 4,但适用于iPhone 3GS(同样的iOS版本,4.3.2)只显示海报图片并点按它不会启动视频。

Works great on an iPhone 4, but on an iPhone 3GS (same iOS version, 4.3.2) is only shows the poster image and tapping it doesn't start the video.

当我尝试直接打开视频文件时,我从手机上获得了提示 Safari开发者控制台:

When I try to open the video file directly, I get a 'tip' from the Mobile Safari developer console:


其他提示

Other Tip

QuickTime

QuickTime

无法播放电影

在iPhone 3GS上播放HTML5视频需要什么?这是一个编码问题吗?

What is needed to get HTML5 video working on an iPhone 3GS? Is it an encoding issue?

推荐答案

我遇到了同样的问题,是的,这似乎是一个编码问题。我按照此处提供的通用智能手机配置文件:

I've experienced the same issue and yes it seems that it's an encoding issue. I followed the Universal Smartphone profile provided here :


默认值:

Defaults:

视频: H.264,3.0级,基线配置文件音频:AAC,1-2个频道

Video: H.264, Level 3.0, Baseline profile Audio: AAC, 1-2 channels

播放:

iOS:iPhone,iPad,Apple TV,iPod Touch,iPod Classic,iPod 5.5G
Blackberry:Bold 9000,Curve 8910,8900,8520,Pearl 9XXX,Storm,
Storm 2,Torch,Tour, Bold 9650 + 9700 Android:全部(?)其他:PSP
(3.30 +),PS3,Xbox 360,网页

iOS: iPhone, iPad, Apple TV, iPod Touch, iPod Classic, iPod 5.5G Blackberry: Bold 9000, Curve 8910, 8900, 8520, Pearl 9XXX, Storm, Storm 2, Torch, Tour, Bold 9650 + 9700 Android: All (?) Other: PSP (3.30+), PS3, Xbox 360, web

不玩:

iPod 5G,PSP(3.30之前),Blackberry Curve 9330,9300,8530,83XX,
Pearl 8XXX,88XX

iPod 5G, PSP (pre-3.30), Blackberry Curve 9330, 9300, 8530, 83XX, Pearl 8XXX, 88XX

设置:

默认值,加上:

audio_bitrate:128(或更低) audio_sample_rate:44100(或更小)尺寸:
480×320 max_frame_rate:30 video_bitrate:1500(或更少)

audio_bitrate: 128 (or less) audio_sample_rate: 44100 (or less) size: 480×320 max_frame_rate: 30 video_bitrate: 1500 (or less)

< a href =http://blog.zencoder.com/2010/09/30/how-to-encode-video-for-mobile-use/ =nofollow> http://blog.zencoder.com/2010/09/30/how-to-encode-video-for-mobile-use/

它解决了这个问题。我的mp4文件现在可以在iPhone 3gs和4上读取。

and it solved the problem. My mp4 file can now be read both on iPhone 3gs and 4.

这篇关于在iPhone 3GS和iPhone 4上嵌入用于Mobile Safari的HTML5视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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