Close webcam with jquery

2

I'm using the Photobooth plugin to capture the webcam image from the browser, but after allowing the webcam to be used browser and make capture in a modal I close the modal and the webcam continues in use. Does anyone know how to close the webcam through jQuery? because in the plugin documentation I did not find this option.

    
asked by anonymous 25.11.2015 / 16:44

1 answer

0

I checked right into the documentation and realized that you have the method pause () that stops the use of the webcam, so I solved the problem as follows:

$(document).on('click','#get-photo',function(){
        $modal.close();
        $('#capiture-image').data("photobooth").pause();
});
    
25.11.2015 / 18:24