Skip to content

Javascript wrapper for capturing Jpeg images from AS3 / Flash webcam

Notifications You must be signed in to change notification settings

fatlinesofcode/JS-Webcam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Capture jpeg image from AS3 webcam using javascript.

Demo

http://fatlinesofcode.github.com/JS-Webcam/demo.html

Usage

//-------------------- initialise the webcam
    (function () {
        var preLoaded = window.onload;
        window.onload = function () {
            if (typeof preLoaded == 'function') preLoaded();
            webcam.embed('webcam.swf', 640, 480, {
                mirror: true,
                smoothing: true,
                framerate: 20,
                shutterSound: 'shutter.mp3'
            });
        };
    })();

// take a photo and append img in result div
        $("#takephoto").click(function () {
            var result = webcam.save('window');
            var img = new Image();
            img.src = result;
            $("#result").append(img);

        });

#Forked from: JS-Webcam

About

Javascript wrapper for capturing Jpeg images from AS3 / Flash webcam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ActionScript 91.8%
  • JavaScript 7.5%
  • Shell 0.7%