I have this javascriptt function, which is when I take the webcam photo, it works, but has hours that the "webcam.snap ()" part does not work. I do not understand why, it has hours that it works, and has hours that do not, it does not return any errors in the console. Here's 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 it gets to hold the click of the DataPopWebCam, but it does not always perform the webcam.snap () function; And here is where I call the take_snapshot () function
<input type="button" value="Capturar" class="btn btn-default" onclick="take_snapshot();" />
Something strange happens, is that if I put the breakpoint it always works right, but when I do not put it, sometimes it does not work.
I've used this link as a reference.