summaryrefslogtreecommitdiff
path: root/cam_public
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2014-03-19 16:35:56 +0100
committerChristian Franke <nobody@nowhere.ws>2014-03-19 16:43:55 +0100
commit80efed22b3c0d43d285ebade7eb99259da2071b5 (patch)
tree38e584b3ec67621ebd558fe2414d79589f34408d /cam_public
parent47685493bc961f0186bab00b24eaf7367468af06 (diff)
Reload images if mjpegplexer is broken
Diffstat (limited to 'cam_public')
-rw-r--r--cam_public/view.html1
-rw-r--r--cam_public/view.js8
2 files changed, 9 insertions, 0 deletions
diff --git a/cam_public/view.html b/cam_public/view.html
index d6bc329..4b846ab 100644
--- a/cam_public/view.html
+++ b/cam_public/view.html
@@ -6,6 +6,7 @@
#cam { width: 100%; height: auto; min-height: 100%; min-width: 1024px; position: fixed; top: 0; left: 0; margin: 0; padding: 0 }
body { padding: 0px; margin: 0px; }
</style>
+ <script src="view.js"></script>
</head>
<body>
<img id="cam" src="../stream.mjpeg"></img>
diff --git a/cam_public/view.js b/cam_public/view.js
new file mode 100644
index 0000000..1630d1b
--- /dev/null
+++ b/cam_public/view.js
@@ -0,0 +1,8 @@
+function reloadSrc() {
+ var camImage = document.getElementById('cam');
+ if (camImage)
+ camImage.setAttribute('src', camImage.getAttribute('src'));
+ window.setTimeout(reloadSrc, 5000);
+}
+
+reloadSrc();