From 70f198501f02e7fab971d96a2ff3b57781b54784 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 14 Dec 2022 10:21:39 -0800 Subject: [PATCH] hikvision: report video codec --- plugins/hikvision/package-lock.json | 4 ++-- plugins/hikvision/package.json | 2 +- plugins/hikvision/src/main.ts | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/hikvision/package-lock.json b/plugins/hikvision/package-lock.json index 4f3fc1fb4..67c9912fa 100644 --- a/plugins/hikvision/package-lock.json +++ b/plugins/hikvision/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/hikvision", - "version": "0.0.115", + "version": "0.0.116", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/hikvision", - "version": "0.0.115", + "version": "0.0.116", "license": "Apache", "dependencies": { "@koush/axios-digest-auth": "^0.8.5", diff --git a/plugins/hikvision/package.json b/plugins/hikvision/package.json index 1865cd387..f817de924 100644 --- a/plugins/hikvision/package.json +++ b/plugins/hikvision/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/hikvision", - "version": "0.0.115", + "version": "0.0.116", "description": "HikVision Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/hikvision/src/main.ts b/plugins/hikvision/src/main.ts index 149b708ff..0767d5aca 100644 --- a/plugins/hikvision/src/main.ts +++ b/plugins/hikvision/src/main.ts @@ -212,11 +212,14 @@ class HikVisionCamera extends RtspSmartCamera implements Camera, Intercom { const [id] = streamingChannel.id; const width = parseInt(streamingChannel?.Video?.[0]?.videoResolutionWidth?.[0]) || undefined; const height = parseInt(streamingChannel?.Video?.[0]?.videoResolutionHeight?.[0]) || undefined; + let codec = streamingChannel?.Video?.[0]?.videoCodecType?.[0] as string; + codec = codec?.toLowerCase()?.replaceAll('.', ''); const vso: MediaStreamOptions = { id, video: { width, height, + codec, } } ret.set(id, vso);