I am developing a website using Responsive Web Technology and HTML5. I have a HD quality video of 720x576 resolution which I am embedding using HTML5 <video>
and <source>
tags.
But as its a very heavy video so I don't want to resize it for Ipad and mobile devices. Rather I would like to load a different video of 320x240 resolution when the site is opened in Mobile/Ipad devices. I have used the media query in <source>
tag but its not workin, below is the sample of the code I have tried with.
<video controls>
<source src="mySmallVideo.webm" type="video/webm" media="all and (max-width:600px)">
<source src="myVideo.webm" type="video/webm">
</video>
Any idea how I can achieve this requirement, if its possible with Jquery and javascript then please provide me with some ideas or if possible with some links.
Thanks in advance.