-
Notifications
You must be signed in to change notification settings - Fork 1
/
view.html
60 lines (47 loc) · 1.35 KB
/
view.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// LINE 34, 66, and 74 reqire you to change 0.0.0.0 out with your servers IP.
<!DOCTYPE html>
<html>
<head>
<title>iSee View Portal</title>
<meta charset="utf-8">
<style>
body {
background-color: lightblue;
font-family: Arial, Helvetica, sans-serif;
}
.header {
text-align: center;
}
button {
background-color: #000;
color: #fff;
padding: 10px;
border: none;
cursor: pointer;
}
</style>
</head>
<body>
<div class="header">
<h1>iSee Security Cam Viewer</h1>
</div>
<img id="myFrame" src="http://0.0.0.0/security/cam.jpg" width="500" height="300"></img>
<script>
// Get the iframe element
var frame = document.getElementById("myFrame");
// Set the initial image URL
var imgUrl = "http://0.0.0.0/security/cam.jpg";
// Define the function to refresh the image
function refreshImage() {
// Generate a random number to prevent caching
var cacheBuster = new Date().getTime();
// Set the new image URL with the cachebuster appended
imgUrl = "http://0.0.0.0/security/cam.jpg?cache=" + cacheBuster;
// Set the src attribute of the iframe element with the new URL
frame.setAttribute("src", imgUrl);
}
// Call the refreshImage function every second
setInterval(refreshImage, 100);
</script>
</body>
</html>