+ 2
How can I write a proper video html code that will be supported on any browser.
I've tried different formats when writing the codes for html. But none worked. The audio seemed to work perfectly, but so far no progress with the video sources.
3 Réponses
+ 2
One way is to use different formats as sources for you video tag
Here is an example that covers all web browsers.
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
<object data="movie.mp4" width="320" height="240">
<embed src="movie.flv" width="320" height="240">
</object>
</video>
Another way ( not sure ) :
Add this line in your head somewhere. <script src="http://api.html5media.info/1.1.5/html5media.min.js"></script>
Also try putting your source in the opening video tag.
<video source src="movie.mp4" type="video/mp4" width="380px" height="190px" controls></video>
+ 2
thanks! I'll try that out
+ 1
okay then post the result.