I'd like to use a html5 video on my web page, here is the code:
<video id="vid" width="100%" autoplay loop>
<source src="video/video.webm" type="video/webm">
<source src="video/video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
The problem is that, when I use webm as video source:
<source src="video/video.webm" type="video/webm">
it works fine on chrome and FF. But as soon as I add mp4 :
<source src="video/video.webm" type="video/webm">
<source src="video/video.mp4" type="video/mp4">
Chrome shows a black screen and the text "waiting for video" on it, But safari and FF show it as expected.
Any suggestions to make it play on all these browsers would be appreciated. Thanks.