0
I have this javascriptt function, which is when you take the webcam photo, it works, but there are times when the "webcam.snap()" part doesn’t work. I do not understand why, there are hours that it works, and there are hours that does not, it does not return any error on the console. Follow the code part :
function take_snapshot() {
document.getElementById('upload_results').innerHTML = '<h1>Realizando Upload da Foto...</h1>';
webcam.snap();
document.getElementById('<%=btnFechaPopWebCam.ClientID%>').click();
}
So much so that he even clicks Closepopwebcam, but he doesn’t always perform the webcam.snap() function; And this is where I call the take_snapshot function()
<input type="button" value="Capturar" class="btn btn-default" onclick="take_snapshot();" />
Something strange that happens, is that if I put the breakpoint it always works right, but when I don’t put, sometimes it doesn’t work.
I used this link as a reference.
Please put a [mcve] that displays the problem.
– Pablo Almeida
It was updated, I put as I call the take_snapshot() function, as explained not always the webcam.snap function works. It skips it, but it works the button click right away.
– Mariana
An EMCV needs a little more than that. The way it is, we can’t understand what the problem is because we can’t reproduce. Read the [mcve] page if you don’t know what this is.
– Pablo Almeida
Sometimes the webcam.snap() function works, and sometimes it doesn’t. I use this library: https://github.com/jhuckaby/webcamjs/blob/master/webcam.js
– Mariana
Post a functional code so we can test, just the way this one doesn’t know how you set up the
webcam– Guilherme Nascimento
This library you are using is in maintenance mode and has over 90 open bugs. The project’s own Readme suggests other libraries.
– Pablo Almeida
http://leonelfraga.com/neomatrixtech/posts/2012/04/capturndo-a-imagem-de-uma-webcam-em-paginas-asp-net-salvando-o-cadastro-em-banco-dados.html I used this link as a reference.
– Mariana