From: Calin Crisan Date: Sun, 13 Oct 2013 14:42:42 +0000 (+0300) Subject: js framerate is now the minimum of the streaming and device framerate X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=29496e32996e5fd304608d63ed2dd19589cb57e9;p=motioneye-debian js framerate is now the minimum of the streaming and device framerate --- diff --git a/doc/todo.txt b/doc/todo.txt index e7d1645..73448ee 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -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 diff --git a/src/handlers.py b/src/handlers.py index cf5a479..6c5e04c 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -355,7 +355,8 @@ class ConfigHandler(BaseHandler): 'id': camera_id, 'name': '<error>', 'enabled': False, - 'streaming_framerate': 1 + 'streaming_framerate': 1, + 'framerate': 1 }) else: diff --git a/static/js/main.js b/static/js/main.js index 2c62872..6277bd9 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -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); } }