Reputation: 528
I have a problem in HTML5 I'm trying to show a video on the Android Emulator Browser I'm using the following Code
<!DOCTYPE HTML>
<html>
<body>
<video width="320" height="240" controls="controls">
<source src="TJ.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</body>
</html>
It's not working I tried to run the same code on Chrome but still not working
Any Ideas ??
Upvotes: 1
Views: 5259
Reputation: 329
As per the current updates chrome is not supporting the H.264 and its subset codecs. If your mp4 file has the H.264 codec then chrome wont play that file in video. This is my personal experience.
Upvotes: 0
Reputation: 18870
Remove the type
attribute from the <source>
element and implement the play via the JavaScript API.
var video = document.getElementsByTagName('video')[0];
video.addEventListener('click',function(){ video.play(); },false);
A quirk of Android.
There's some useful stuff here: Making HTML5 Video Work on Android Phones.
Upvotes: 3
Reputation: 2881
I would suggest adding a codec property to the source tag.
More information on possible values here :
http://www.w3.org/TR/html5/video.html
Upvotes: 0