From 3c5dbec24c72bda90adfae43fae3fbf5546eab75 Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Sat, 11 Mar 2023 16:32:00 -0500 Subject: [PATCH] v2.0.t7 Apparently native html5 or modern browsers do not support running .m3u8 playlist directly or I was missing something in the original code. Even adding the correct mime types in apache2 didn't work so I decided to embed hls.js into the video html files to support hls playlist. --- src/common.cpp | 2 +- src/common.h | 2 +- src/web.cpp | 29 +++++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index b04e1c7..2f11941 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -246,7 +246,7 @@ bool rdConf(shared_t *share) share->pixThresh = 50; share->imgThresh = 800; share->maxDays = 15; - share->maxEvents = 20; + share->maxEvents = 40; share->maxLogSize = 50000; share->skipCmd = false; share->schSec = 60; diff --git a/src/common.h b/src/common.h index fce6ce1..8dd567e 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.t6" +#define APP_VER "2.0.t7" #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 9a82a2f..5532276 100644 --- a/src/web.cpp +++ b/src/web.cpp @@ -71,7 +71,7 @@ void genHTMLul(const string &outputDir, const string &title, shared_t *share) // regName.substr(0, regName.size() - 5) removes .html auto name = regName.substr(0, regName.size() - 5); - htmlText += "\n"; + htmlText += "\n"; } } @@ -112,9 +112,30 @@ void genHTMLvid(const string &name) htmlText += "\n"; htmlText += "\n"; htmlText += "\n"; - htmlText += "\n"; + htmlText += " \n"; + htmlText += " \n"; + htmlText += " \n"; htmlText += "\n"; htmlText += "";