]> www.vanbest.org Git - motioneye-debian/commitdiff
simple mjpeg cameras: don't look for motion detection cookie
authorCalin Crisan <ccrisan@gmail.com>
Sun, 14 Jun 2015 19:39:46 +0000 (22:39 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 14 Jun 2015 19:39:46 +0000 (22:39 +0300)
static/js/frame.js
static/js/main.js

index 93ed060189efeb4f600b8fac1f0a98a08aa64489..028279d006f0ca6ecfbc4f68155c7ee68b81c104 100644 (file)
@@ -50,7 +50,7 @@ function setupCameraFrame() {
         
         /* there's no point in looking for a cookie update more often than once every second */
         var now = new Date().getTime();
-        if (!this.lastCookieTime || now - this.lastCookieTime > 1000) {
+        if ((!this.lastCookieTime || now - this.lastCookieTime > 1000) && (cameraFrameDiv[0].proto != 'mjpeg')) {
             if (getCookie('motion_detected_' + cameraId) == 'true') {
                 cameraFrameDiv.addClass('motion-detected');
             }
index e3dccc8237972ff99a9a9fad657b91316c0141ba..6b7a10901e0e783691bced5ec048e853b3098e52 100644 (file)
@@ -3605,7 +3605,7 @@ function addCameraFrameUi(cameraConfig) {
         
         /* there's no point in looking for a cookie update more often than once every second */
         var now = new Date().getTime();
-        if (!this.lastCookieTime || now - this.lastCookieTime > 1000) {
+        if ((!this.lastCookieTime || now - this.lastCookieTime > 1000) && (cameraFrameDiv[0].config['proto'] != 'mjpeg')) {
             if (getCookie('motion_detected_' + cameraId) == 'true') {
                 cameraFrameDiv.addClass('motion-detected');
             }