Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.03 KB

README.md

File metadata and controls

39 lines (31 loc) · 1.03 KB

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