]> www.vanbest.org Git - motioneye-debian/commitdiff
js framerate is now the minimum of the streaming and device framerate
authorCalin Crisan <ccrisan@gmail.com>
Sun, 13 Oct 2013 14:42:42 +0000 (17:42 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 13 Oct 2013 14:42:42 +0000 (17:42 +0300)
doc/todo.txt
src/handlers.py
static/js/main.js

index e7d16452829504f12ab7889d2cacb93e976102e4..73448ee1375780a7584c3925f1900d63db045e26 100644 (file)
@@ -1,5 +1,3 @@
--> js framerate should be the minimum between the two framerates 
-
 -> style scroll bars
 -> hint text next to section titles
 -> clickable hints
index cf5a479824f7fbee00394bb462cf2739e35654c5..6c5e04c3353e5b22f6d97a0006cefcc7c274e61a 100644 (file)
@@ -355,7 +355,8 @@ class ConfigHandler(BaseHandler):
                             'id': camera_id,
                             'name': '&lt;error&gt;',
                             'enabled': False,
-                            'streaming_framerate': 1
+                            'streaming_framerate': 1,
+                            'framerate': 1
                         })
                     
                     else:
index 2c62872d5c3578d020549e58fce923ec8395ae4e..6277bd9418f3ceb95720021008c27d4b9f92a483 100644 (file)
@@ -1249,10 +1249,10 @@ function recreateCameraFrames(cameras) {
             camera = cameras[i];
             var cameraFrame = pageContainer.find('div.camera-frame#camera' + camera.id);
             if (cameraFrame.length === 0) { /* not existing, add a new one */
-                addCameraFrameUi(camera.id, camera.name, camera.streaming_framerate);
+                addCameraFrameUi(camera.id, camera.name, Math.min(camera.streaming_framerate, camera.framerate));
             }
             else { /* existing, update params */
-                cameraFrame[0].framerate = camera.streaming_framerate;
+                cameraFrame[0].framerate = Math.min(camera.streaming_framerate, camera.framerate);
             }
         }