From 2c6178454e088f742434c984e16310cc92d18880 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 9 Sep 2017 22:37:33 +0300 Subject: [PATCH] streaming framerate is now automatically set to device framerate + 5fps --- motioneye/static/js/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/motioneye/static/js/main.js b/motioneye/static/js/main.js index e1e64ab..a1f7452 100644 --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@ -780,11 +780,14 @@ function initUI() { } }); - /* streaming framerate must be >= device framerate */ + /* streaming framerate must be >= device framerate + a margin */ $('#framerateSlider').change(function () { var value = Number($('#framerateSlider').val()); var streamingValue = Number($('#streamingFramerateSlider').val()); - + + value += 5; /* a margin of 5 extra fps */ + value = Math.min(value, 30); /* don't go above 30 fps */ + if (streamingValue < value) { $('#streamingFramerateSlider').val(value).change(); } -- 2.39.5