Jun. 22, 2010 at 5:19pm View comments

iPad HTML5 Video mime problem

I know. You have been beating your keyboard against your desk for hours getting that html5 video embed test working in MobileSafari on the iPad. You must have melted a small glacier re-encoding with every combination of container, encoding, and bitrate!

You checked and double checked your video tag. (You made sure to close the </video> and </source> tags right? Of course you did. You’re a professional after all.)

I know what the problem is. But I’m not going to tell you. Ok, ok, I’ll tell you, but only because I like you and I don’t want you to get fired.

Surprise! It’s your web server’s Content-Type header!

For some weird reason, browsers will disregard the mime type you explicitly wrote in the <source type="video/mp4"/> tag, and instead choose to trust the mime type coming from the server. For example, older IIS servers treat .mp4 files as application/octet-stream which seems ok to me, but simply did not fly with iPad.

Now how do you change your web server’s mime map? That’s between you and Google, buddy.

blog comments powered by Disqus