I have created application in android phonegap.I want to play video using html5 video player. My code is:
Add android:hardwareAccelerated="true" as a child in your activity manifest file. It plays html5 video inside webviews without any workaround.
eg
<activity
android:name="com.example.MainActivity"
android:hardwareAccelerated="true"
android:configChanges="keyboardHidden|orientation|screenSize" >
...
</activity>
Are you sure you video stream is 'H.264' and audio stream id 'AAC' for MP4. Because I guess Android support MP4
When you use Video tag for playing video in phonegap app,it works well on iphone but not on android.
You said it didn't worked on emulator, right? Don't you think video isn't being reproduced mainly because on Android SDK emulator you probably don't have any hardware acceleration for it? Some things don't work properly (sometimes don't work at all) if you don't have HW acceleration and a device powerful enough for that.
If that's the case, a workaround is using videos in 3GP format. That should work Android SDK emulator, and on older Android-powered cellphones with weak hardware. I used that on a project of mine.
try something like this
var video = document.getElementById('video');
video.addEventListener('click',function(){
video.play();
},false);
In addition to what ghostCoder says below (adding a click handler to play the video which you need to do for Android) also try removing type='video/mp4'
as this sometimes confuses Android.