Closed MichPot closed 3 years ago
Finally I found my solution! there she is stopStreamedVideo(video); function stopStreamedVideo(videoElem) { const stream = videoElem.srcObject; const tracks = stream.getTracks(); tracks.forEach(function(track) { track.stop(); }); videoElem.srcObject = null; }
Glad you found a solution!
requestAnimationFrame still running
Hello and thank you for jsQR! I'm newbie with programming, with a little help i found the way to insert the jsQR into a web form and it works. I only have a problem, the camera never stop.
After code found, how can i stop camera streaming? after : outputData.innerText = code.data;
if (code) { drawLine(code.location.topLeftCorner, code.location.topRightCorner, "#FF3B58"); drawLine(code.location.topRightCorner, code.location.bottomRightCorner, "#FF3B58"); drawLine(code.location.bottomRightCorner, code.location.bottomLeftCorner, "#FF3B58"); drawLine(code.location.bottomLeftCorner, code.location.topLeftCorner, "#FF3B58"); outputMessage.hidden = true; outputData.parentElement.hidden = false; outputData.innerText = code.data; ? Thank you for your help