English 中文(简体)
Does html5 video work on android nexus one with android version 2.1?
原标题:

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.

问题回答

No, the Android Browser doesn t support HTML5 at the current time.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签