html5视频是否适用于android版本2.1的android nexus?

时间:2010-04-06 17:58:12

标签: android html5 html5-video

我正在尝试在Android 2.1上运行html5演示页,尝试使用2.1的droid和nexus,但它们只显示海报图像,并且不播放视频。按视频不会做任何事情。 编辑 - 使用视频标记上的onclick处理程序解决

此时可以在android 2.1浏览器中使用html5视频吗?我的演示页面适用于iphone和ipad。

mp4视频:avc1,29.97 fps,380 kbps,480 x 370 音频:mp4a,44 kHz,64 kbps

以下是页面的编写方式:

<!DOCTYPE html>
<html><head><title>html5 test</title></head><body>
<video id="movie" width="480" height="370" poster="http://example.com/still.jpg" controls>
<source src="http://example.com/video.mp4" type="video/mp4">
Your browser does not support html5 video.
</video>
</body></html>

2 个答案:

答案 0 :(得分:2)

更新:使用Android 2.1我可以通过在视频代码中添加onclick="this.play();来获取视频但不在页面中播放:

<!DOCTYPE html>
<html><head><title>html5 test</title></head><body>
<video id="movie" width="480" height="370" poster="http://example.com/still.jpg" controls onclick="this.play();">
<source src="http://example.com/video.mp4" type="video/mp4">
Your browser does not support html5 video.
</video>
</body></html>

但是,这不会在浏览器中播放,它会启动媒体播放器以在自己的窗口中播放视频。

答案 1 :(得分:0)

不,Android浏览器目前不支持HTML5。