test for getUserMedia
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
app.js
package.json
receiver.html
sender.html

README.md

Webcam Test

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.

Prepare

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.

How to Run

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.

References

I referenced and used code from following aricles: