From a1de45e66a98a83f7cab6e24db522dfe7c637c64 Mon Sep 17 00:00:00 2001 From: homeautomaton <48721345+homeautomaton@users.noreply.github.com> Date: Sat, 13 May 2023 14:59:12 -0500 Subject: [PATCH 01/34] close clients so that switching inputs works for connected client --- server.js | 2 +- videoStream.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 182b162..97b81e1 100644 --- a/server.js +++ b/server.js @@ -225,7 +225,7 @@ async function killall() { async function recreateStream() { streams.forEach(((stream) => { stream.mpeg1Muxer.kill(); - stream.wsServer.close(); + stream.stop(); })); if (config.killAll) { await killall(); diff --git a/videoStream.js b/videoStream.js index 1746bf6..b849fda 100755 --- a/videoStream.js +++ b/videoStream.js @@ -29,6 +29,9 @@ util.inherits(VideoStream, events.EventEmitter) VideoStream.prototype.stop = function () { this.wsServer.close() this.stream.kill() + for (let client of this.wsServer.clients) { + client.close() + } this.inputStreamStarted = false return this } From 1e2db40fbb52da374dc73da985164a8c7001b39a Mon Sep 17 00:00:00 2001 From: "b2f7d-github@yahoo.com" <48721345+homeautomaton@users.noreply.github.com> Date: Wed, 31 May 2023 13:10:30 -0500 Subject: [PATCH 02/34] much refactoring, better feedback, more remote buttons enabled --- camera-admin-ui/public/camera.html | 54 ++++++++++-- camera-admin-ui/src/components/Config.js | 27 +++--- server.js | 100 +++++++++++++---------- 3 files changed, 119 insertions(+), 62 deletions(-) diff --git a/camera-admin-ui/public/camera.html b/camera-admin-ui/public/camera.html index 364d0a4..e13f94f 100644 --- a/camera-admin-ui/public/camera.html +++ b/camera-admin-ui/public/camera.html @@ -8,12 +8,29 @@