Video.js Blog

Steve Heffernan2010-11-19

Make sites serve you HTML5 video in Safari

John Gruber of Daring Fireball has a cool post on tricking websites to display HTML5 video when they say they can only play Flash. Many sites will tell you they require Flash, even when they actually support HTML5 video for iOS devices.

To add to Grubers post, theres two reasons a site might do this:

  1. Theyre trying to protect their content from being easily downloaded, which HTML5 video cant do very well yet.

  2. They assume everyone with a browser has Flash, and just serve HTML5 video to iOS devices.

So for this first, this is actually a hack to download content some publishers might not want you to. I probably shouldnt be publishing this since security of the content is one of the main reasons HTML5 video will still take time to spread. But for that purpose, its really not hard to figure out.

For the second, its kind of lazy implementation of fallbacks. Its pretty easy to check if Flash is supported, and if not, fall back to HTML5, instead of checking for a specific user agent string. So for sites using VideoJS, this method wouldnt work, but there also wouldnt be a need because VideoJS would fallback appropriately to HTML5.

Gruber has disabled Flash in Safari for better performance with video. That says a lot. Most people probably wont go to same effort he has, but I know hes not the only one.