Reputation: 1
According:
HTML5 <video> element on Android
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var video = document.getElementById('video');
video.addEventListener('click',function(){
video.play();
},false);
</script>
</head>
<body>
<video id="video" autobuffer height="240" width="360">
<source src="BigBuck.m4v">
<source src="BigBuck.webm" type="video/webm">
<source src="BigBuck.theora.ogv" type="video/ogg">
</video>
</body>
</html>
Is this right, Can you give me a full sample?
Upvotes: 0
Views: 4339
Reputation: 181
The HTML5 video tag is not supported on Android devices, because it doesn't work in Android's WebView. On my Android 3.2 tablet device, the video tag is working well in a regular Chrome browser, but gives the folowing error when I try to run the same application wrapped by PhoneGap and I can hear only the sound (Video is not diplayed):
call to OpenGL ES API with no current context
You can find a discussion about this problem here: http://comments.gmane.org/gmane.comp.handhelds.phonegap/19275
The current solution for this issue is to play the video using native Android media player (through VideoView). There are several open source PhoneGap plugins that can help you with this.
Please let me know if you need more information about this.
Upvotes: 2
Reputation: 38908
Three things to check:
Upvotes: 0