A PhotoBooth running from the browser! This is more a packaged version of great ideas grabbed on the Internet. Those are listed below 👇.
- https://tutorialzine.com/2016/07/take-a-selfie-with-js
- https://stackoverflow.com/a/16245768
- https://stackoverflow.com/a/40141662
- Server running with Node.js + Express
- Based on MediaDevices Web API and Canvas
- Webcam is needed
- Can either be use on touch screens or with a Bluetooth remote
- Printer is optional
# | action | browser | server | notes |
---|---|---|---|---|
1 | capture photo | ✔ | getUserMedia | |
2 | validate or retry | ✔ | ||
3 | send photo to server | ✔ | Canvas + Fetch | |
4 | photo saved | ✔ | Watching files | |
5 | photo printed | ✔ | CUPS |
# Run in parallel
# Start express
$ yarn serve
# Watch new photos and print them
$ yarn print
$ yarn
$ yarn start
# Run in parallel
$ yarn start:dev
$ yarn serve:dev
$ yarn print
Add following files in /public:
- watermark.png
- favicon.ico