Show HN: WebcamSwiper - a JS library that watches for hand swipes in the air
github.com
github.com
Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1
Awesome idea and use of getUserMedia though.
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.
edit: It looks like the OP merged it back at the submitted url.
(Just to break the non-working pace.)
Or is there another way of getting "FaceTime" camera feed with Safari?
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).
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?
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.
I don't know if how you'd sent it somewhere with the same origin policy in place.
nope, the "use webcam" permission is per "getUserMedia" call, so 2 getUserMedia calls = 2 allowbar popups.
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.
(Chrome, Windows 7)
It's also nice to know that you can do this kind of things in JS.
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?
[1] www.crunchfish.com