From: Calin Crisan Date: Sun, 3 May 2015 15:12:54 +0000 (+0300) Subject: increasing the device framerate now automatically increases the X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=5d1e93bcad41ab29170f21d3f0b97f72c3985ebb;p=motioneye-debian increasing the device framerate now automatically increases the streaming framerate --- diff --git a/src/config.py b/src/config.py index e044294..0e36ffb 100644 --- a/src/config.py +++ b/src/config.py @@ -472,6 +472,7 @@ def add_camera(device_details): elif proto == 'netcam': camera_config['netcam_url'] = device_details['url'] + camera_config['text_double'] = True if device_details['username']: camera_config['netcam_userpass'] = device_details['username'] + ':' + device_details['password'] _set_default_motion_camera(camera_id, camera_config) diff --git a/static/css/ui.css b/static/css/ui.css index ad9acc2..895b670 100644 --- a/static/css/ui.css +++ b/static/css/ui.css @@ -176,7 +176,7 @@ input[type=text].time { width: 3.5em; } -input[disabled] { +input[readonly] { border: 1px solid #555 !important; } diff --git a/static/js/main.js b/static/js/main.js index 819f552..40d05aa 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -469,7 +469,7 @@ function initUI() { makeSlider($this, Number($tr.attr('min')), Number($tr.attr('max')), Number($tr.attr('snap')), ticks, Number($tr.attr('ticksnum')), Number($tr.attr('decimals')), $tr.attr('unit')); }); - + /* progress bars */ makeProgressBar($('div.progress-bar')); @@ -672,6 +672,16 @@ function initUI() { pushCameraConfig($(this).parents('tr:eq(0)').attr('reboot') == 'true'); }); + /* streaming framerate must be >= device framerate */ + $('#framerateSlider').change(function (val) { + var value = Number($('#framerateSlider').val()); + var streamingValue = Number($('#streamingFramerateSlider').val()); + + if (streamingValue < value) { + $('#streamingFramerateSlider').val(value).change(); + } + }); + /* preview controls */ $('#brightnessSlider').change(function () {pushPreview('brightness');}); $('#contrastSlider').change(function () {pushPreview('contrast');}); @@ -1465,11 +1475,11 @@ function dict2CameraUi(dict) { var mjpgUrl = location.protocol + '//' + location.host.split(':')[0] + ':' + dict.streaming_port; var embedUrl = cameraUrl + 'frame/'; - if (dict.proto == 'motioneye') { // TODO what about other protocols + if (dict.proto == 'motioneye') { /* cannot tell the mjpg streaming url for a remote motionEye camera */ mjpgUrl = ''; } - + if ($('#normalPasswordEntry').val()) { /* anonymous access is disabled */ snapshotUrl = addAuthParams('GET', snapshotUrl); if (mjpgUrl) { diff --git a/templates/main.html b/templates/main.html index 92df18e..d7133e6 100644 --- a/templates/main.html +++ b/templates/main.html @@ -205,11 +205,11 @@ Camera Device - + Camera Type - +
@@ -253,7 +253,7 @@ - ? + ? Video Rotation @@ -270,7 +270,7 @@ Frame Rate - ? + ? Extra Motion Options