Close webcam with jquery

Asked

Viewed 292 times

2

I’m using the plugin Photobooth to capture webcam image by nevegador, but after allowing the use of webcam by the browser and make the capture in a modal I close the modal and the webcam remains in use. Does anyone know how to close the webcam by jQuery? because in the plugin documentation I did not find this option.

  • I also want to discover the same thing, but I want to do in javascript "pure"

  • I never did this kind of work, but by chance when closing the modal you could call a plugin that closes the cam. There is a tutorial explaining the use of the plugin, it may have the function you want. http://demo.tutorialzine.com/2011/04/jquery-webcam-photobooth/

1 answer

0


I checked the documentation and I realized that it has the method (pause) that serves to stop the use of webcam, so I solved the problem as follows:

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

Browser other questions tagged

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