From 78919effcfb7a12e3323b042f55e089ad4ecf445 Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Sat, 11 Mar 2023 07:56:16 -0500 Subject: [PATCH] v2.0.t6 Added live camera streaming support to the web interface for testing. --- src/common.h | 2 +- src/web.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index 1984586..fce6ce1 100644 --- a/src/common.h +++ b/src/common.h @@ -37,7 +37,7 @@ using namespace std; using namespace std::filesystem; using namespace std::chrono; -#define APP_VER "2.0.t5" +#define APP_VER "2.0.t6" #define APP_NAME "Motion Watch" #define REC_LOG_NAME "rec_log_lines.html" #define DET_LOG_NAME "det_log_lines.html" diff --git a/src/web.cpp b/src/web.cpp index 6154f12..9a82a2f 100644 --- a/src/web.cpp +++ b/src/web.cpp @@ -45,9 +45,18 @@ void genHTMLul(const string &outputDir, const string &title, shared_t *share) if (exists(outputDir + "/VIDEO_TS")) { + htmlText += "

Live

\n"; + htmlText += "\n"; htmlText += "

Motion Events

\n"; + + if (!exists("stream.html")) + { + genHTMLvid("stream"); + } } - + for (auto &®Name : regNames) { if (regName.ends_with("_log.html")) @@ -56,6 +65,7 @@ void genHTMLul(const string &outputDir, const string &title, shared_t *share) } else if (regName.ends_with(".html") && !regName.ends_with("index.html") && + !regName.ends_with("stream.html") && !regName.ends_with("_log_lines.html")) { // regName.substr(0, regName.size() - 5) removes .html