Html5 Video Tag Not Working In Android Phonegap
Solution 1:
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.
Solution 2:
When you use Video tag for playing video in phonegap app,it works well on iphone but not on android.
Solution 3:
Add android:hardwareAccelerated="true" as a child in your activity manifest file. It plays html5 video inside webviews without any workaround.
eg
<activityandroid:name="com.example.MainActivity"android:hardwareAccelerated="true"android:configChanges="keyboardHidden|orientation|screenSize" >
...
</activity>
Solution 4:
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.
Solution 5:
try something like this
var video = document.getElementById('video');
video.addEventListener('click',function(){
video.play();
},false);
Post a Comment for "Html5 Video Tag Not Working In Android Phonegap"