支持Android的Nexus One采用Android 2.1版本的HTML5视频的工作? [英] Does html5 video work on android nexus one with android version 2.1?

查看:238
本文介绍了支持Android的Nexus One采用Android 2.1版本的HTML5视频的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Android 2.1系统工作的HTML5演示页,曾经尝试都Droid和Nexus One的2.1,但他们只显示广告图像,并没有播放视频。在视频pressing没有做任何事情。 编辑 - 与视频标签的on​​click处理程序解决

是否有可能在这个时候使用HTML5视频在Android 2.1浏览器?我的演示页正在为iPhone和iPad两种。

MP4视频:AVC1,29.97,380 kbps的,480 * 370
音频:MP4A,​​44千赫,64 kbps的

下面是如何在页面写的是:

 <!DOCTYPE HTML>
< HTML和GT;< HEAD><标题> HTML5测试< /标题>< /头><身体GT;
<视频ID =电影WIDTH =480HEIGHT =370的海报=htt​​p://example.com/still.jpg控制>
<信源SRC =htt​​p://example.com/video.mp4TYPE =视频/ MP4>
您的浏览器不支持HTML5视频。
< /视频>
< /身体GT;< / HTML>


解决方案

更​​新:Android 2.1系统,我可以通过增加获得视频页面播放,但不是一个的onclick =this.play( ); 来这样的视频标签:

 <!DOCTYPE HTML>
< HTML和GT;< HEAD><标题> HTML5测试< /标题>< /头><身体GT;
<视频ID =电影WIDTH =480HEIGHT =370的海报=htt​​p://example.com/still.jpg的onclick =控制this.play();>
<信源SRC =htt​​p://example.com/video.mp4TYPE =视频/ MP4>
您的浏览器不支持HTML5视频。
< /视频>
< /身体GT;< / HTML>

不过,这并没有在浏览器中播放时,它启动媒体播放器在自己的窗口播放视频。

I'm trying to get an html5 demo page working on Android 2.1, have tried both droid and nexus one with 2.1 but they only display the poster image, and do not play the video. Pressing on the video does not do anything. Edit- resolved with the onclick handler on the video tag

Is it possible to use html5 video in the android 2.1 browser at this time? My demo page is working for both the iphone and the ipad.

The mp4 video: avc1, 29.97 fps, 380 kbps, 480 x 370 Audio: mp4a, 44 kHz, 64 kbps

Here's how the page is written:

<!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>

解决方案

Update: with Android 2.1 I can get the video to play but not in the page by adding an onclick="this.play(); to the video tag like this:

<!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>

However, this does not play in the browser, it launches the media player to play the video in its own window.

这篇关于支持Android的Nexus One采用Android 2.1版本的HTML5视频的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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