Reputation: 71
As HTML5 doesnot support all the video formats, is there any other JS/JQ based video player that is lightweight and supports variety of video formats? Thanks
Upvotes: 1
Views: 4424
Reputation: 8228
if your concern is simply that you need to display .mp4 in some browser, .webm elsewhere and .ogg in a third and you have sources in all three formats you can simply specify them as alternate sources on the tag and based on the MIME type the browser will display the one that it can support
<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">
Sorry - Your browser does not support the HTML5 video tag.
</video>
Upvotes: 1
Reputation: 4932
Implementing video player in JavaScript is not practically possible at the moment as you need some cooperation with hardware to accelerate the playback -- drawing pixels to canvas one by one is remotely not that fast. Current "JavaScript video players" just ask browser to do the trick and then they draw some interface around.
If you are concerned with a lack of support for codecs in browser, you should think about browser plugins, primarily about Flash, perhaps about Silverlight. Some HTML5 JS libraries (http://videojs.com, for example) provide Flash alternative as a fallback.
Upvotes: 0