switched to 'input' update for motionInterval on add_stream page

This commit is contained in:
BroodjeAap 2020-08-13 17:44:46 +00:00
parent c19812a181
commit 8b001243c5
2 changed files with 10 additions and 2 deletions

View file

@ -11,3 +11,11 @@ function motionIntervalChange(){
let motionIntervalLabel = document.getElementById("motion_interval_label"); let motionIntervalLabel = document.getElementById("motion_interval_label");
motionIntervalLabel.innerHTML = "Motion Interval (MS): " + motionIntervalInput.value motionIntervalLabel.innerHTML = "Motion Interval (MS): " + motionIntervalInput.value
} }
document.addEventListener("DOMContentLoaded", function(){
motion_interval_slider = document.getElementById("motion_interval");
motion_interval_slider.addEventListener("input", e => {
motionIntervalChange();
});
});

View file

@ -18,7 +18,7 @@
<span class="pure-form-message">{{.IntervalMessage}}</span> <span class="pure-form-message">{{.IntervalMessage}}</span>
<label id="motion_interval_label" for="motion_interval">Motion Interval (MS): 1000</label> <label id="motion_interval_label" for="motion_interval">Motion Interval (MS): 1000</label>
<input type="range" id="motion_interval" name="motion_interval" onchange="motionIntervalChange()" value="1000" min="50" max="5000"> <input type="range" id="motion_interval" name="motion_interval" value="1000" min="50" max="5000">
<span class="pure-form-message">{{.MotionIntervalMessage}}</span> <span class="pure-form-message">{{.MotionIntervalMessage}}</span>
<button type="submit" class="pure-button pure-button-primary">Submit</button> <button type="submit" class="pure-button pure-button-primary">Submit</button>