From f6d0274f745f87214a7348adda813ad9796a7d34 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 14 Dec 2021 17:05:56 -0500 Subject: [PATCH] Fix PrevCycle because monIdx was empty. --- web/skins/classic/views/js/watch.js | 5 ++++- web/skins/classic/views/js/watch.js.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 8a0f527c9..90c73dd9f 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -904,9 +904,10 @@ function initPage() { if (monitorType != 'WebSite') { if (streamMode == 'single') { - statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout); + statusCmdTimer = setTimeout(statusCmdQuery, 100); setInterval(watchdogCheck, statusRefreshTimeout*2, 'status'); } else { + streamCmdTimer = setTimeout(streamCmdQuery, 100); setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream'); } @@ -1054,9 +1055,11 @@ function cycleNext() { } function cyclePrev() { + console.log(monIdx); monIdx --; if (monIdx < 0) { monIdx = monitorData.length - 1; + console.log(monIdx); } if (!monitorData[monIdx]) { console.log('No monitorData for ' + monIdx); diff --git a/web/skins/classic/views/js/watch.js.php b/web/skins/classic/views/js/watch.js.php index ab09d6ca5..d7b108b6d 100644 --- a/web/skins/classic/views/js/watch.js.php +++ b/web/skins/classic/views/js/watch.js.php @@ -1,5 +1,5 @@ Refresh() ?>'; var monitorStreamReplayBuffer = StreamReplayBuffer() ?>; var monitorControllable = Controllable()?'true':'false' ?>; -var monIdx = ''; +var monIdx = ; var nextMid = ""; var mode = "";