Last active
August 1, 2017 21:45
-
-
Save gordonmeyer/5732642 to your computer and use it in GitHub Desktop.
A simple Javascript-based reload of a webcam for use with Status Board.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>campage</title> | |
<meta name="generator" content="BBEdit 10.1"> | |
</head> | |
<body onload="LoadNewImage()"> | |
<script type="text/javascript" language="JavaScript"> | |
function LoadNewImage() | |
{ | |
var unique = new Date(); | |
document.images.webcam.src = "http://username:[email protected]:9999/image.jpg?time=" + unique.getTime(); | |
setTimeout(LoadNewImage, 300000); | |
} | |
</script> | |
<img src="http://camera.example.com:8888/image.jpg" name="webcam" height="250" width="250"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For background see:
http://www.gordonmeyer.com/2013/06/update-a-status-board-webcam-image-using-javascript.html