37 comments

[ 3.0 ms ] story [ 88.9 ms ] thread
Cool idea! Demo didn't work for me on latest version of Chrome and a brand new MacBook Air though, and gave it a pretty good shot. I'm sure you didn't put this up without testing that it works, just didn't work after about 3-5 minutes of trying everything for me.
Same issue, browser and hardware here. This is the error I see in my js console:

Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1

Awesome idea and use of getUserMedia though.

Same problem here.

For a demo like this where failures can be caused by user error instead of app error, you should consider overlaying a tiny rectangle on screen that shows the webcam captured frames with an overlay of the recognition, so it's easier to tell if it's user error.

Same error MacBook Air and Chrome 23.0.1271.10 dev
Didn't work for me either (on chrome). I kinda felt like a moron waving my hands around trying to get it to work. Would have been cool if the camera was doing a live capture and would let me watch my moronic movements after a while.
This was exactly what I was thinking when it didn't work for me; the book page would finally turn and show all kinds of people doing swipes (in all possible ways) in the air... (Macbook Air 2011, latest Chrome).
Didn't work for me either on MacBook Air and Chrome 22.0.1229.79.
Same, using 22.0.1229.79 on Mountain Lion.
works for me on the same setup. real cool idea.
Demo worked for me on Chrome 22 / Lenovo w510 / Win 7.
REALLY glad to see this worked for some people, I was hoping it wasn't totally a bust!
REALLY glad to see this worked for some people, I was hoping it wasn't totally a bust!
Question: how could this be exploited to provide unknowing access to a webcams via modifying this .js to run on a subjectively trusted page?

Forgive me if I am being naive but just curious if this could be turned into something that accesses my webcam nefariously?

Anyone on HN willing to test if this is possible?

Well, it's opt-in. So unknowing access is (at least without further actions) not possible.

getUserMedia: "Prompts the user for permission to use their Web cam or other video or audio input." [1]

By the way: The example doesn't work for me either.

[1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html

Sure, but I am asking if this can be modded to gain unauth access to the webcam.
Possibly if someone managed to include it on a page you had already given permission.

I don't know if how you'd sent it somewhere with the same origin policy in place.

>Possibly if someone managed to include it on a page you had already given permission.

nope, the "use webcam" permission is per "getUserMedia" call, so 2 getUserMedia calls = 2 allowbar popups.

The 'allow getusermedia' policy is handled by the browser, not javascript.

It's possible that some day there will be a browser bug for bypassing it, but you can't just write javascript code that says "don't ask for permission".

Nowadays the majority of webcams also hard-wire their 'on' light, so the user would at least get an indication that the webcam is suddenly recording.

Didn't work for me in Chrome. I was expecting it to prompt me for permission - nothing came up. I tried swiping a couple times just in case =P
That is damn cool; I didn't even know there was an api for pure js. I thought you were stuck using flash if you wanted to use the camera.
Worked for me. Amazing! A very nice experience.

(Chrome, Windows 7)

It's also nice to know that you can do this kind of things in JS.

It did not work on my macbook pro with Chrome browser.
Worked for me. MacBook Pro and Chrome 21.

(Just to break the non-working pace.)

works on MacBook Pro and Chrome 22.0.1229.79.
I just made a small change that may help (thanks to evanc). If you have the error again, try refreshing.
The demo was awesome! The only thing is that after i swipe left with my right hand, I move my hand back to the normal position which appears to the camera to be a swipe to the right. Maybe it could detect front of hand/back of hand to be able to ignore one? That aside, it was pretty cool!
This happened for me as well.
??? Why the hell iPad (2 - iOS 6) doesn't support getUserMedia()?! It's ridiculous.

Or is there another way of getting "FaceTime" camera feed with Safari?

Apple intentionally cripples their browser here and there to nudge developers toward creating actual apps that are served through the App Store and to discourage them from making things that can load through the browser.
Without having tried it, this sounds a bit like Crunchfish's Active3D[1].

[1] www.crunchfish.com

Funny. Recently I was shown a hardware implementation that recognizes gestures, for embedded applications (e.g. cars).

This is on the other end of the implementation spectrum, in a browser, written in js. Quite cool nevertheless, although again not working in my browser of choice, Firefox (right now, the Android Beta).

Wow, had a VERY nice experience with this - I am impressed. MacBook Air, OSX 10.8 on latest version of Chrome. Well done, hope I can plug this into a pet project someday.
I love this, really cool.

I found it a little buggy too, in that it picked up non-swipe movements quite a lot, but an awesome demo nonetheless. Are you planning on continuing to develop this?