Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script>
- var myCamTimer, myCamTimeout, dial1;
- function refreshCamera() {
- var b = new Date;
- a = document.getElementById("myCam");
- a.src = a.src.substring(0, a.src.indexOf("nocache=")) + "nocache=" + b.getTime()
- }
- function startCamRefresh() {
- clearInterval(myCamTimer);
- clearTimeout(myCamTimeout);
- myCamTimer = setInterval(function() {
- refreshCamera()
- }, 5e3);
- myCamTimeout = setTimeout(function() {
- stopCamRefresh()
- }, 65e3);
- try {
- document.getElementById("camRefLink").style.visibility = "hidden";
- } catch (a) {}
- }
- function stopCamRefresh() {
- clearInterval(myCamTimer);
- clearTimeout(myCamTimeout);
- try {
- document.getElementById("camRefLink").style.visibility = "visible";
- } catch (a) {}
- }
- </script>
- </head>
- <body onload=startCamRefresh()>
- <img id="myCam" style="height:240px;width:352px;"
- src="https://pa511cams.ilchost.com/cameras/d6/CAM-06-470.jpg?nocache=1539188740869"
- title="cam image - US 1 NB at Old Lincoln Highway">
- <div id="camRefLink" style="visibility:hidden">Stream Timed Out</div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement