hikvision: report video codec

This commit is contained in:
Koushik Dutta
2022-12-14 10:21:39 -08:00
parent e182af44a6
commit 70f198501f
3 changed files with 6 additions and 3 deletions

View File

@@ -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",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/hikvision",
"version": "0.0.115",
"version": "0.0.116",
"description": "HikVision Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -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);