From bb2ecd7bd8a59cc26006f1665c24e308e40423c7 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 18 Mar 2025 11:57:02 -0700 Subject: [PATCH] reolink: fix optional chaining for mainEncType --- plugins/reolink/package-lock.json | 4 ++-- plugins/reolink/package.json | 2 +- plugins/reolink/src/main.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/reolink/package-lock.json b/plugins/reolink/package-lock.json index 6c2933829..93a2b950b 100644 --- a/plugins/reolink/package-lock.json +++ b/plugins/reolink/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/reolink", - "version": "0.0.107", + "version": "0.0.108", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/reolink", - "version": "0.0.107", + "version": "0.0.108", "license": "Apache", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/reolink/package.json b/plugins/reolink/package.json index 5898f0581..7257ed3eb 100644 --- a/plugins/reolink/package.json +++ b/plugins/reolink/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/reolink", - "version": "0.0.107", + "version": "0.0.108", "description": "Reolink Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/reolink/src/main.ts b/plugins/reolink/src/main.ts index 77f6a5bfb..932ea0460 100644 --- a/plugins/reolink/src/main.ts +++ b/plugins/reolink/src/main.ts @@ -843,7 +843,7 @@ class ReolinkCamera extends RtspSmartCamera implements Camera, DeviceProvider, R // 1: main stream enc type is H265 // anecdotally, encoders of type h265 do not have a working RTMP main stream. - const mainEncType = this.storageSettings.values.abilities?.value?.Ability?.abilityChn?.[rtspChannel].mainEncType?.ver; + const mainEncType = this.storageSettings.values.abilities?.value?.Ability?.abilityChn?.[rtspChannel]?.mainEncType?.ver; if (live === 2) { if (mainEncType === 1) {