From 8b001243c5a00c5b3559c6a04d540b8277fb5bf3 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Thu, 13 Aug 2020 17:44:46 +0000 Subject: [PATCH] switched to 'input' update for motionInterval on add_stream page --- static/js/add_stream.js | 10 +++++++++- templates/add_stream.html | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/add_stream.js b/static/js/add_stream.js index bef5efa..cf2f3e5 100755 --- a/static/js/add_stream.js +++ b/static/js/add_stream.js @@ -10,4 +10,12 @@ function motionIntervalChange(){ let motionIntervalInput = document.getElementById("motion_interval"); let motionIntervalLabel = document.getElementById("motion_interval_label"); motionIntervalLabel.innerHTML = "Motion Interval (MS): " + motionIntervalInput.value -} \ No newline at end of file +} + +document.addEventListener("DOMContentLoaded", function(){ + motion_interval_slider = document.getElementById("motion_interval"); + + motion_interval_slider.addEventListener("input", e => { + motionIntervalChange(); + }); +}); \ No newline at end of file diff --git a/templates/add_stream.html b/templates/add_stream.html index 01d4f21..8f51cc6 100755 --- a/templates/add_stream.html +++ b/templates/add_stream.html @@ -18,7 +18,7 @@ {{.IntervalMessage}} - + {{.MotionIntervalMessage}}