I have a responsive site that has a blog which shows videos with HTML5.
As of now, I use the following formats:
- MP4 HD video - for computer users
- MP4 SD video - for mobile users
- WebM HD Video - for computer users
- WebM SD Video - for mobile users
poster.jpg
- poster withwidth: 640px
for all devices.
My HTML5 to select a device is:
<video controls="controls" height="260" poster="poster.jpg" preload="none" width="463">
<source media="all and (max-width: 480px)" src="video_sd.mp4" type="video/mp4" />
<source media="all and (max-width: 480px)" src="video_sd.webm" type="video/webm" />
<source src="video.mp4" type="video/mp4" />
<source src="video.webm" type="video/webm" />
</video>
Summarizing, having 4 files of the same video for a responsive site results in approximately 1GB data per video ...
My question is: Am I doing this in right way?