Simple Java script for displaying your webcam images
Yes, I know what you are thinking. Webcams are soo nineties… But since nowadays every grandpa has his own RasberryPi running at home and can connect a USB cam to it, they regained popularity.
Recently I installed my first personal webcam and I needed a good way to look at the images using a web browser. The simple approach of just showing the image was quite ugly. Due to the slow upload speed of the webcam, refreshing the image was a pain. The image was flashing and then progessively reappeared on the screen. Quite horrible.
That’s why I wrote a simple java script that loads the image in the background and updates the screen when loading has finished. I also added a history of the previous images so that I don’t loose something interesting. A checkbox which enables auto refresh of the images works as well. During refresh a loading icon is displayed.
The script is nothing special but maybe it saves someone a bit of time. You can grab it here: