html5 视频可以在 Android Nexus One 和 Android 版本 2.1 上运行吗?
我正在尝试在 Android 2.1 上运行一个 html5 演示页面,已尝试使用 2.1 的 droid 和 Nexus One,但它们只显示海报图像,而不播放视频。按视频不会执行任何操作。 使用视频标签上的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>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更新:使用 Android 2.1,我可以通过向视频标签添加
onclick="this.play();
来播放视频,但不能在页面中播放,如下所示:但是,这不会在浏览器启动媒体播放器在自己的窗口中播放视频。
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:However, this does not play in the browser, it launches the media player to play the video in its own window.
不,Android 浏览器目前不支持 HTML5。
No, the Android Browser doesn't support HTML5 at the current time.