So, after Simon snitched on me and leaked highly sensitive information about my top-secret project, I guess it’s finally time to spill the beans.
Yes, it is true. For the past few months I have been semi-secretly working on taking over the world implementing support for the HTML5 video and audio elements in the Qt port of WebKit, using Phonon as the media backend. This adds QtWebKit to the list of cool browsers that support this feature.
The introduction of a special purpose media element in the HTML5 draft allows embedding of audio and video content into web pages without resorting to using the generic object tag with some random plugin-based player. It’s as easy as this:
<video src="foobar.ogg">Fallback content here.</video>
The media element also comes with a scripting API, making it easy to roll your own player interface if you want to (or use the default one provided by the user agent by adding the controls attribute).
Employing Phonon to implement the playback started out as my “hey-welcome-to-Trolltech-here-is-a-fun-task-for-you”-project, but turned out to also be a good test-case for the implementation of the various Phonon backends we are doing here at Trolltech. The project was momentarily put on ice while we were busy stabilizing the 4.4 release, but now that 4.4 is out the door it’s time to get back in the saddle.
Some of the tasks currently in the pipeline are Win and Mac support (which is still largely untested), full screen support using overlays (for speed), routing the data through an IODevice rather than just passing a URL (which will help buffering and let us ensure that per-site credentials will work), plus implementing more of the default UI controls.
Initial support is already in WebKit trunk for those of you who want to try it out, and the finished result will be in Qt 4.5. Here’s a screenshot, for you pixel peepers out there:

9 Responses to “Top Secret, Hush Hush!”
Sounds cool. Does it mean you really implement OGG support even original WebKit didn’t? Is there any possibility to backport it back to WebKit?
@Martin: Playback is passed on to Phonon, so in theory this should work with whatever codecs your Phonon back-end supports. For example on X11 if you have GStreamer plugins for Ogg playback you’re good to go. But no, there’s no actual decoding going on in the WebKit code, so there’s nothing to backport really.
Awesome. One more piece of the puzzle.
wow, cool!
Thats gr8!
Is the feature available in any of the development snapshots? What all phonon backends are being planned at Trolltech ?
@Nitin: It will be available in the Qt 4.5 snapshots once we snapshot WebKit trunk for moving our development efforts from WebKit trunk to the Qt tree (for stabilizing 4.5), but you can already get check out the feature in WebKit trunk. We are actively developing the GStreamer, DirectShow, and QuickTime7 backends, check out the full list of available backends here: http://phonon.kde.org/cms/1034
I’m having problems checking out WebKit trunk. The instructions on the Arora project page seem to be broken; I assume it’s supposed to be “git clone” and not just “clone” but the “git checkout” line just throws errors. I really want to play with this. ![]()
@Adam: Did you try the instructions at http://trac.webkit.org/wiki/BuildingQtOnLinux ? First you need to check out WebKit trunk, and build the QtWebKit part of WebKit. You should then be able to run the QtLauncher app, which is a minimal browser. Next you can clone Arora (following http://code.google.com/p/arora/wiki/BeginnerStepByStepInstructions), and build that against WebKit trunk using the webkittrunk.pri in $ARORA/src.
From http://dist.trolltech.com/pdf/qt-webkit-feb-2008-whitepaper-a4.pdf:
“The use of embedded Java® applets inside Web browsers has become less common in recent
years. For this reason, integration of Java with the Web browsing component is last on the
list of priorities, and is currently planned to be done after the Qt 4.4 release.”
Does anyone have any information on if/when applets will be supported in QWebView? I’ve got a QWebView in a dialog box, and whenever it tries to load a page with an applet, it seems to stop loading.
Thanks!
Spencer