WebKit Renderer

Per Mark Arana's post at http://www.mail-archive.com/quartzcomposer-dev@lists.apple.com/msg00067....

Render webpages, including flash and videos.

cwright's picture
flash et. al.

I don't know if webkit renders flash stuff by default. Paparazzi does something like this (and offers source to older versions), which might be a decent enough start. However, testing it reveals its lack of flash and javascript (though it was an old version that I tried).

sbn..'s picture

I've commented on a Create Digital Motion post here, reporting that Flash support is gone in Quicktime / Leopard.

As you can read in that post, I'd really like some form of generative code patch in QC - be it Flash, Processing, or NodeBox (as someone else suggested). Preferably an OSS solution. If Webkit can bridge both Flash and Java / Processing support and be easier to implement, I'm willing to live with having to do a dummy HTML page. If that's what it takes. As a bonus, you'd get live web pages in QC.

Just.Jake's picture
I was looking into this the

I was looking into this the other day; the most straight forward way is to render a webkit view in an offscreen dummy window with a size specified in input nodes. The way I'm doing it right now totally lacks any sort of dynamic support -- it just puts one image to the output node. I have no idea how to even attempt to do Flash/Javascript/Java bridging from Webkit :-/

cwright's picture

I think this is how paparazzi does it as well (it creates a window at -16000,-16000, and renders to it, then gets an image of the window).

Good work with getting a basic version working. Do you feel like posting screenshots? or, better yet, source? ;)

Some quick googling fails to turn up anything interesting with rendering flash inside webkit (lots of people asking how to do it though, but no results :/ ), so that may be a bit more intensive...

Just.Jake's picture
applescript hackery

A way to do this could be to create a real-life Safari window at -16000,-16000, as Safari includes all that functionality you wouldn't have to do yourself.

Then get screenshot, etc.

cwright's picture

WebKitAlpha.jpg83.19 KB

yanomano's picture
pre-alpha ?

Did you do that between 2 WWDC conferences ?....:) Seems it is not photoshoped (or very clean...:) so...it's alive...?

cwright's picture
... during ...

I did it mostly during the Bonjour conference (it was more boring than I was expecting, hopefully smokris picked up the important parts), and then got the image capturing working in an Open Lab. Working on some polish before release.

yanomano's picture
They don't kidnap you !?

I want to be a little mouse to see smorkis and you coding durind the bonjour conference...:) You are definitly superstars...:)

cwright's picture
consummate V's!

Here's some more showing off: flash support ;)

. o O (3.. 2.. 1.. all hell breaks loose... :)

yanomano's picture
Flash ?

Do you plan to manage input/output from a ..? html..?....swf ? This could be very efficient for GUI things....And with the features of flashplayer10...have no words...;) Processing support...?

cwright's picture
very limited

Right now, it's a really bad implementation: it renders flash through webkit, and reads the webkit output continuously. It's very cpu intensive, and definitely not the best solution. But it works for now, and that's what counts I guess.

Working on adding mouse control (so you can click links, etc), and then a "keyboard output as string" patch so you can type in text fields easily. This isn't going so well though: can't quite figure out fake event forwarding to properly interact with the webkit view.

If I may ask, what are you doing up so early? you're turning into me at this rate... :)

toneburst's picture
Very Nice

Funnily enough, I was just chatting to one of the VDMX developers yesterday about this very thing.

What would be really cool would be if you could control Flash movies on a rendered webpage in realtime. I guess you'd need to link parameters in the Flash movie to JS variables in the containing page source somehow, or perhaps have Flash read data from an XML file that could be altered on-the-fly from QC. Perhaps this would also allow Processing applets to be controlled from QC too...

Great work guys, and hope you're having/had a good time at WWDC.


Quartz Composer Blog: http://machinesdontcare.wordpress.com

Music Site: http://www.toneburst.net

cwright's picture
full living webpage

the way it's done now, the flash stuff lives on a full webpage -- JS, ajax, the whole nine yards. So once mouse event delivery works, we'll have a real, live complete webpage, flash included. slower than all get-out, but fully functional nonetheless. No QC control required (other than mouse position/click information)

yanomano's picture
No release today ?....;)

ok this is anecdodic as usual...:) if not....some release today ?



cwright's picture

Is a non-interactive version useful enough for a release? Mouse/keyboard event hijacking doesn't seem to work, so it'll require way more hacking for mouse support etc.

If you want, I can skip that and make a beta release today sometime.:)

psonice's picture
2 versions?

I can think of situations where I'd use this plugin, but not many where I'd need any interaction with the page view. I can see it being handy for some people though.. So how about either 2 versions (webkit view and interactive webkit?) Or just a 'disable interaction' type button in the settings, assuming it's not just a case of not forwarding mouse coords + clicks to the patch.

Anyway, I've no actual use for this particular one at the moment, so don't let my opinion swing it :)

cwright's picture
1 version to rule them all

there will only be one version of this plugin, to disable interaction you'll just not feed mouse/keyboard events. There will probably also be a persistence option (to keep the page running in the background, for flash audio etc).

yanomano's picture

don't spend your time with my joke....:) There were so much releases next days that you will need to commission full time testers !

vince's picture
very useful

this would be very useful. will you post a beta release soon?

yanomano's picture
Beta release :)

Can we have a chance to play with ?

cwright's picture

soon.. still trying to figure out why mouse events don't work when the window's invisible... keyboard events work though, which is kinda cool I guess :)

mfreakz's picture
WebKit news ?

Hi, Do you still plan a beta for this patch ? It could be great !

mattgolsen's picture
How much of an immediate use

How much of an immediate use do you think there would be for forwarding mouse events? Would you be willing to put it out there and maybe add mouse events at a later date?

psonice's picture
mouse events

Is mouse forwarding actually useful with webkit when the window is hidden anyway? It's not like mouse control is used for much other than clicking on stuff, and that gets pretty hard if you can't see the window anyway :)

Or do you mean the webkit window is hidden (or off screen) but still being shown on a billboard in QC?

cwright's picture
still shown

The window's always invisible, but then it's captured, and rendered on a billboard/wherever (it's a normal QC texture/image).

WebKit can't seem to render to non-window views, and it rejects mouse events when the window isn't focused (invisible windows can't be focused, of course).

I don't know if there's a way around it or not... I've not poked the source much recently (last time was around october)... lots on my plate at the moment, so this one's probably pretty far back on the list.

vince's picture
Non Interactive Beta?

Hi Chris, Can you release the non interactive version of this into beta? I am putting together a screensaver that will display various webpages. Currently I can convert them to PDFs and display them in QC, but it would be much better to get a live webpage in there. Much appreciated!

SolidRoot's picture

Yeah, I could definitely use this beta as well. Pretty please :)

gtoledo3's picture

http://www.ornl.gov/~t6p/Main/Utilities.html http://neutrons.ornl.gov/diagnostics/

This might be worth taking a look at. Doesn't do Flash, etc...but can be programmed to update every x seconds.

vince's picture
thank you, this is exactly what i needed


gtoledo3's picture
You're welcome.... Take a

You're welcome....

Take a look at the package contents of Visigami, if I remember correctly, for a cool example of .qtz setup that pulls images from the web (I might be wrong about that, it's been awhile)...