From: Calin Crisan Date: Sat, 9 Sep 2017 19:37:33 +0000 (+0300) Subject: streaming framerate is now automatically set to device framerate + 5fps X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=2c6178454e088f742434c984e16310cc92d18880;p=motioneye-debian streaming framerate is now automatically set to device framerate + 5fps --- 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(); }