Webcam Canvas - Zoom

Asked

Viewed 94 times

3

Is there any way, a command that will allow me to change the webcam zoom ? In this code below is where I create my Webcam canvas for Snapshot on the site.

I want to apply - zoom, ie increase the coverage area of Cam. It is possible ?

    /* ACTIVE WEBCAM */
    if(!webCamActive)
    {
        webCamActive = true;
        navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;

        var vgacontraint = {
            video: {
                mandatory: {
                    maxWidth: 650,
                    maxHeight: 435
                }
            }
        };

        if(navigator.getUserMedia){
            navigator.getUserMedia(vgacontraint, function(stream){
                webCamVideo.src = window.URL.createObjectURL(stream);
                webCamVideo.play();
            }, function(e){
                console.log(e);
            });
        }
    }
  • 1

    Solved. I walked away to take the photo. Thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.