You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
878 B

<html>
<head>
<title>MiniWebCam</title>
<script src="jquery-3.1.0.min.js"></script>
<link rel="stylesheet" href="default.css">
</head>
<body>
<div class="toggle">
<label>Filter Processing<input id="floatimage" type="checkbox"><span class="slider"></span></label>
</div>
<br>
<div class="webcamimage">
<img id="webcamimage" src="snapshot.jpg"></img>
</div>
<br>
<table id="controls"></table>
</body>
<script>
function reloadImage() {
const img1 = document.getElementById('webcamimage');
const filterimage1 = document.getElementById('floatimage');
let src1 = "snapshot.jpg";
if (filterimage1.checked) src1 = "snapshot-float.jpg";
src1 = src1 + '?' + new Date().getTime();
img1.src = src1;
}
setInterval(reloadImage, 250);
</script>
</html>