tags:

views:

164

answers:

1

Hey all,

I have done a ton of searching and am hitting a brick wall. I am able to use HTML5 on a Motorola Droid with Android 2.1. The problem is when I add fallback options for firefox, and flash that add multiple source files. If I use src within the video tag, and add the onclick="this.play();" code within the video tag, I can watch the mp4 on the Droid. I found this code at this link below. When I use this with multiple src files, I either dont know where to put this piece of code or it just doesn't work.

http://stackoverflow.com/questions/1711078/html5-video-element-on-android

When I use the code like below, it always work on my droid, where I touch the video thumbnail and it opens the video in the video player:

<video src="video/placeholder.m4v" poster="video/placeholder.jpg" onclick="this.play();"/>

This is my code but it wont allow me to click the video or shows the thumbnail in the Android browser. I have tried putting the onclick= in the src lines as well, with no luck:

<video width="640" height="360" controls onclick="this.play();" /><source src="2.mp4" type="video/mp4" /><source src="spit.ogv" type="video/ogg" /><div style="width:640px;height:360px;" id="player"></div><script language="JavaScript">flowplayer("player","flowplayer-3.2.2.swf","splash.flv");</script>  </video>

I want to update my entire site to use HTML5 through firefox, safari, flash for older browsers and hopefully for android and iphones. It seems like it is much harder to get html5 working for phones than desktop browsers. I saw this guy using this but I think it is annoying (and I would need to redesign the site for these buttons) that I have to have external buttons created by java for it to work on a phone.

Any help is greatly appreciated!

A: 

Alright, found the solution on this page:

http://stackoverflow.com/questions/2911379/html5-video-element-on-android-does-not-play

Guess if you remove the codecs, everything works fine.

Thanks!

Tim