Wow, I was sure they implemented requestAnimationFrame already!
Anyway, I limited myself to trying out the various vendors' prefixes; this being mainly an experiment/preview I'd rather keep the code clean than support non-cutting-edge browsers.
I'll update the paragraph about the compatibility though; thanks for the heads up!
Last weekend at #devfestlondon I attempted streaming and sharing these video streams over socket.io with a node.js backend. Demo is http://svideo.herokuapp.com/ and http://svideo.jit.su/ - your image stream is shared on the internet.
I wrote a li'l app that does something along the same lines. However it captures a data uri from the webcam video and sends it via a websocket to a second user who's also doing the same. It gives you a video chat just without the audio... https://github.com/bencevans/MediaStream
I was thinking of libifying my thingy, in a quite minimalistic way (at a minumum, the user would just pass two functions, one "update" and one "draw", which would receive a the current frame and, in the first case, the delta time).
This way you could just get freaky with the canvas effects and composing capabilities and stop caring about the low-level stuff.
I see you know your way around building nice, clean APIs; could you suggest me article/book about it? I'm kind of a newbie to that sort of things.
addy osmani has coded https://github.com/addyosmani/getUserMedia.js which has a flash fallback, but the thing is that the flash fallback still needs you to implement a complete different logic then getUserMedia, so it's far from a perfect solution.
Strange enough my performance is real crappy (3fps) when I launch it, but when I switch to another tab and back it's great.
This happens on Chrome 21 with none of the flags enabled.
I'm afraid it depends on the browser implementation. It works fine on Chrome 12 odd on linux, with all hardware accelerations activated under chrome://flags/
Well, for what concerns the part I focused on (the canvas part) there should not be any performance issue with p2p.
For WebRTC p2p video streaming in general, it seems promising. At the moment, though, there's little to no browser support and getting a full system (there's also a server involved, to initiate the connections) is not automated or abstracted yet.