From 48bc6cd6d314429a74b7d08be30b8efff3609cd3 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 14 Oct 2021 02:22:47 -0700 Subject: [PATCH] rebroadcast: cleanups --- plugins/prebuffer-mixin/package-lock.json | 4 ++-- plugins/prebuffer-mixin/package.json | 2 +- plugins/prebuffer-mixin/src/main.ts | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/prebuffer-mixin/package-lock.json b/plugins/prebuffer-mixin/package-lock.json index ec94a7be2..194d9af73 100644 --- a/plugins/prebuffer-mixin/package-lock.json +++ b/plugins/prebuffer-mixin/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.62", + "version": "0.1.63", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.62", + "version": "0.1.63", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/prebuffer-mixin/package.json b/plugins/prebuffer-mixin/package.json index a74b26fa7..1ec4660c2 100644 --- a/plugins/prebuffer-mixin/package.json +++ b/plugins/prebuffer-mixin/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.62", + "version": "0.1.63", "description": "Rebroadcast and Prebuffer for VideoCameras.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/prebuffer-mixin/src/main.ts b/plugins/prebuffer-mixin/src/main.ts index 554f403d9..0b50a868c 100644 --- a/plugins/prebuffer-mixin/src/main.ts +++ b/plugins/prebuffer-mixin/src/main.ts @@ -449,7 +449,7 @@ class PrebufferMixin extends SettingsMixinDeviceBase implements Vid settings.push( { title: 'Prebuffered Streams', - description: 'The streams to prebuffer.', + description: 'The streams to prebuffer. Enable only as necessary to reduce traffic.', key: 'enabledStreams', value: enabledStreams.map(mso => mso.name), choices: msos.map(mso => mso.name), @@ -458,7 +458,11 @@ class PrebufferMixin extends SettingsMixinDeviceBase implements Vid ) } - for (const session of this.sessions.values()) { + for (const id of this.sessions.keys()) { + // ignore the default key entry, which will resolve to something else. + if (id == null) + continue; + const session = this.sessions.get(id); settings.push(...await session.getMixinSettings()); }