
Show HN: WebcamSwiper - a JS library that watches for hand swipes in the air - iambrandonn
https://github.com/iambrandonn/WebcamSwiper
======
tomasien
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.

~~~
tylerlh
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.

~~~
kevingadd
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.

------
prezjordan
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.

------
aeurielesn
Worked for me. MacBook Pro and Chrome 21.

(Just to break the non-working pace.)

~~~
pingu
works on MacBook Pro and Chrome 22.0.1229.79.

------
cstrat
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

------
batgaijin
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.

------
pooriaazimi
??? 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?

~~~
clockstrikesten
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.

------
darklajid
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).

------
chacham15
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!

~~~
bhoomit
This happened for me as well.

------
samstave
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?

~~~
jmaicher
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>

~~~
samstave
Sure, but I am asking if this can be modded to gain unauth access to the
webcam.

~~~
mithras
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.

~~~
franze
>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.

------
TeMPOraL
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.

------
asher_
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?

------
iambrandonn
I just made a small change that may help (thanks to evanc). If you have the
error again, try refreshing.

------
orjan
Without having tried it, this sounds a bit like Crunchfish's Active3D[1].

[1] www.crunchfish.com

------
nu2ycombinator
It did not work on my macbook pro with Chrome browser.

