If you’re like me, you’ve probably worked with Flash video for client’s websites or maybe on your own. It’s pretty simple to set up, you just need the .swf and the .flv files and you’re good to go. And I thought that HTML5 video would be even easier but the first time I tried to host a video on my site, it didn’t play. Everything worked fine on my desktop but when I uploaded it, it wouldn’t play.
If you’re on an Apache server, it’s an easy fix. Just add this to your .htaccess file (If you don’t have an .htaccess file, just make one and upload it):
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Now your HTML5 video should work. If you really want to know what’s going on, Mozilla as a good article and if you want to know everything you need to know about HTML5 video, check out the video chapter of Dive Into HTML5.