Skip to content

Commit

Permalink
streaming framerate is now automatically set to device framerate + 5fps
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Sep 9, 2017
1 parent 7a8b5d7 commit 2c61784
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions motioneye/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 2c61784

Please sign in to comment.