News for hackers. Stuff that matters.
Re:Show HN: HTML5 webcam pics to email with motion detection by pixeltwenty on Monday January 22, 2018 @11:58AM (#16205875)
The motion detection takes place in the browser with JavaScript which analyzes and quantifies RGB value differences. HTML5 takes care of the camera. An email server is still required - HTML5 doesn't cover that of course. This works with up-to-date Firefox, Chrome, Edge, and Opera browsers on Windows, Mac, and Android (the OS specific browsers running as applicable on various platforms). I am currently aware of just Safari and iOS on iPhone/iPad not working - the camera view shows all black and I have not yet attempted to solve.
Re:Show HN: HTML5 webcam pics to email with motion detection by DougWebb on Monday January 22, 2018 @02:00PM (#16206913)
It might be useful to get it running on headless Chrome, so it can run completely server-side. There's probably better ways to do that, but it could be fun.
Re:Show HN: HTML5 webcam pics to email with motion detection by untog on Monday January 22, 2018 @02:19PM (#16207069)
I've not used it, but there's a node-webcam module:

https://www.npmjs.com/package/node-webcam

That you could presumably pair with node-canvas (or something similar) to achieve the same results without a browser needing to be involved.

Re:Show HN: HTML5 webcam pics to email with motion detection by blacksmith_tb on Monday January 22, 2018 @01:00PM (#16206397)
What if js could handle sending email via Mailgun, Sendgrid etc.? Then it could be self-hosted (though you may not want it to be, of course).
Re:Show HN: HTML5 webcam pics to email with motion detection by pixeltwenty on Monday January 22, 2018 @02:01PM (#16206927)
Thanks for the ideas. One thing I have wrestled with in the past is how to prevent exposing the third party site email credentials (credentials the page would utilize for accessing Sendgrid, etc.) if the emailing code were hosted in the local and observable JavaScript. With the current server solution, at a minimum the browser and CORS enforcement take care of attempted cross domain access ... which is probably just slightly better than nothing at all.
Re:Show HN: HTML5 webcam pics to email with motion detection by j_s on Monday January 22, 2018 @02:15PM (#16207040)
Let end users provide their own third party site email credentials.
Re:Show HN: HTML5 webcam pics to email with motion detection by pixeltwenty on Monday January 22, 2018 @02:20PM (#16207073)
I like that idea. It could be an alternative, an additional option.
Re:Show HN: HTML5 webcam pics to email with motion detection by randomString1 on Monday January 22, 2018 @06:22PM (#16209121)
You could use something that is not e-mail. From uploading the images to a shared/cloud folder and/or a messenging protocol to notify you.