Cool hack – html5tube

Did I mention I hate flash? I do. It crashes a lot, and is overall a bad thing for the web, in my opinion. But I do enjoy watching videos on the web, and unfortunately, up to this day, flash is what most sites use to show videos. Months ago I read a couple of blog posts with nice hacks to make Firefox able to play youtube videos without using the flash player. Some recent discussions with colleagues at work got me itching to try my hand at something similar for Epiphany.

HTML5Tube working

So I went ahead, and wrote a new extension that does just that – in youtube video pages, it finds the flash player element, and replaces it with an HTML5 video tag pointing to the actual movie file. This causes the internal HTML5 media player built into WebKitGTK+, that is based on GStreamer, to play the movie. That means you only need to have the necessary GStreamer magic, and the extension enabled, to enjoy the movie.

There are some caveats – in-video text messages are gone (though I’m pretty sure we could get them added somehow), playlists, and other places which display videos other than the ‘normal’ video watching page are not handled, youtube needs to think you have the flash plugin installed, at least, so the only way to make it work right now is to actually have a flash plugin installed. I think we could probably get away with the last problem somehow, by looking at what the totem youtube plugin code does, for instance, and replicating it.

12 Replies to “Cool hack – html5tube”

  1. The Totem YouTube plug-in uses the API which YouTube has published, and streams the videos that way. It never touches the actual web pages. It does have some other issues though, like blocking the UI quite a lot, and being generally slow, and I don’t know if it handles the HD streams. I’d like to see the bugs fixed, and a firefox or whatever extension that converts the YouTube flash videos into thumbnail links with play buttons that when clicked, open the video in Totem instead. And it would do this for any URLs pointing at a YouTube video as well. Sort of how it works on my phone.

  2. What would make this even more super cool is if epiphany supported the fullscreen video javacript hooks that the latest webkit supports 😀

  3. Wow. This sounds really cool. I’m not sure I understand how to apply the patch to try this out. Can you either explain how to do that or provide the extension directly in some way that will make Epiphany install it automagically?

  4. Just got your HTML5Tube through Debian unstable, epiphany-extensions, epiphany-extension-more, it works great for me, thanks for the hack, I’m a big epiphany/webkit fan, thanks for adding to the experience

Leave a Reply

Your email address will not be published. Required fields are marked *