• Stars
    star
    503
  • Rank 87,705 (Top 2 %)
  • Language
    JavaScript
  • Created about 12 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTML5 webcam to canvas stream

Camvas

A simple HTML5 library to stream a webcam video to a <canvas> object.

Uses WebRTC (getUserMedia), Canvas and HTML5 Video.

Check out a sample application, too: camvas_photobooth.

Example usage:

window.onload = function(){
  var ctx = document.getElementsByTagName('canvas')[0].getContext('2d')
  var draw = function(video, dt) {
    ctx.drawImage(video, 0, 0)
  }
  var myCamvas = new camvas(ctx, draw)
}

Homepage

You can find annotated source code, demo and useful resources at http://cbrandolino.github.com/camvas