Skip to content

Instantly share code, notes, and snippets.

@cgiffard
Created November 24, 2011 07:39
Show Gist options
  • Save cgiffard/1390844 to your computer and use it in GitHub Desktop.
Save cgiffard/1390844 to your computer and use it in GitHub Desktop.
HTML5 video for Kickstarter

HTML5 Video for Kickstarter

Doesn't it annoy you that you can't watch any of the Kickstarter videos because you don't have flash?

This bookmarklet converts their player to a straight HTML5 <video> tag.

Unfortunately you'll need Safari, Chrome (well, for the near future anyway) or IE9/10, because Kickstarter videos are only available in H.264. Sorry.

javascript:(function()%7Bvar%20v=document.querySelectorAll(%22%5Bdata-video%5D%22)%5B0%5D;var%20i=v.querySelectorAll(%22img%22)%5B0%5D;var%20v2=v.getAttribute(%22data-video%22);var%20v3=document.createElement(%22video%22);v3.src=v2;v3.width=i.width;v3.height=i.height;v3.autobuffer=true;v3.poster=i.src;v3.controls=true;i.parentElement.replaceChild(v3,i);var%20b=document.querySelectorAll(%22.button-playvideo%22)%5B0%5D;b.parentElement.removeChild(b);$(%22.overlay%22).unbind(%22click%22);%7D)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment