UC-ACM-Web-Cam is a project mainly written in JavaScript, it's free.
This is a silly web cam page we leave open in our windowless office.
This is a simple web cam page we use in our windowless ACM office at UC.
Feel free to borrow the code, although it is a little over-engineered.