This is an example to demonstrate a webcam streaming only using javascript. It accesses webcam using getUserMedia
api to capture an image, sends it to server, and then receiver receives the image. Because the sender does it very frequently, it looks like it is streaming a video.
You need this specific build of Opera that supports getUserMedia
api to access webcam. After installing it, two setting must be updated. Go to about:config
and enable Security Prefs
-> Allow Camera to To Canvas Copy
, and User Prefs
-> Enable WebSockets
.
Oh, and you need node.js installed.
Clone this repo and run the following:
$ npm install
$ node app.js
Then access to http://localhost:8000/sender.html using the Opera. Access to http://localhost:8000/receiver.html using, maybe Chrome or Safari.
You should see the streaming going on.
I referenced and used code from following aricles: