Monday, November 14, 2011

Basic HTML5 Embed



Sample code:

<video controls width="640" height="360">
  <source src="http://www.pixelgoat.net/encoding/markus_output/html5/fuerte.mp4" type='video/mp4' />
  <source src="http://www.pixelgoat.net/encoding/markus_output/html5/fuerte.webm" type='video/webm' />
</video>

Suggested HTML5 Video targets:

mp4 - videos play in Safari, Internet Explorer, Android, and iPhone
webm - videos play in FireFox, Chrome, and Android
flv - Flash fallback, requires Adobe Flash plugin
ogg - older format, lower quality, for old versions of FireFox


NOTE: For Android devices, I'd still recommend Webm VP8 for 100% compatibility. With Android there is spotty support for Flash, HLS, and MP4 depending on manufacturer, OS version, and preinstalled players.