Evocam Webcam Html -

snapshotCounterSpan.innerText = snapshotsArray.length;

// optional: keyboard shortcut 'c' for capture (if camera active) window.addEventListener('keydown', (e) => if (e.key === 'c' ); evocam webcam html

<html> <body> <h1>Evocam Webcam</h1> <img src="http://192.168.0.100:8080/video.mjpg" /> <br /> <button onclick="takeSnapshot()">Take Snapshot</button> <script> function takeSnapshot() var xhr = new XMLHttpRequest(); xhr.open("GET", "http://192.168.0.100:8080/snapshot", true); xhr.responseType = "blob"; xhr.onload = function() if (xhr.status === 200) var blob = xhr.response; var img = document.createElement("img"); img.src = URL.createObjectURL(blob); document.body.appendChild(img); snapshotCounterSpan

Powered by EvoCam

); ); updateUIState();