rtsp cameras: publish. fix onvif auth.

This commit is contained in:
Koushik Dutta
2021-10-22 13:38:47 -07:00
parent aff093db04
commit 8a6380b01d
12 changed files with 50 additions and 31 deletions

3
.gitmodules vendored
View File

@@ -13,3 +13,6 @@
[submodule "plugins/tensorflow/face-api.js"]
path = plugins/tensorflow/face-api.js
url = git@github.com:koush/face-api.js
[submodule "external/axios-digest-auth"]
path = external/axios-digest-auth
url = git@github.com:koush/axios-digest-auth

1
external/axios-digest-auth vendored Submodule

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.58",
"version": "0.0.59",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/amcrest",
"version": "0.0.58",
"version": "0.0.59",
"license": "Apache",
"dependencies": {
"@koush/axios-digest-auth": "^0.7.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.58",
"version": "0.0.59",
"description": "Amcrest Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/hikvision",
"version": "0.0.62",
"version": "0.0.63",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/hikvision",
"version": "0.0.62",
"version": "0.0.63",
"license": "Apache",
"dependencies": {
"@koush/axios-digest-auth": "^0.7.2",

View File

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

View File

@@ -1,15 +1,15 @@
{
"name": "@scrypted/onvif",
"version": "0.0.38",
"version": "0.0.42",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/onvif",
"version": "0.0.38",
"version": "0.0.42",
"license": "Apache",
"dependencies": {
"@koush/axios-digest-auth": "^0.7.2",
"@koush/axios-digest-auth": "^0.8.3",
"@scrypted/sdk": "file:../../sdk",
"@types/node": "^16.9.1",
"base-64": "^1.0.0",
@@ -38,6 +38,7 @@
"axios": "^0.21.4",
"babel-loader": "^8.2.3",
"babel-plugin-const-enum": "^1.1.0",
"esbuild": "^0.13.8",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"ts-loader": "^9.2.6",
@@ -57,11 +58,12 @@
"extraneous": true
},
"node_modules/@koush/axios-digest-auth": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.7.2.tgz",
"integrity": "sha512-gdO5pWjM9E1i+zgrDmHKc2pdrt5E335tzhtqvB3dj8IKTfT7dSIZTXPsqKgkN9UCMtKNcRVx5iBTNz4AOET91A==",
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.8.3.tgz",
"integrity": "sha512-KdVuBegM6lNtQkh9q27gitriUwYzr1FzZp1r90ueNA9iXqOzhSHip+JfFbwDc9qzzkQOLgs0PLUc/14SY6JxYQ==",
"dependencies": {
"axios": "0.21.1"
"auth-header": "^1.0.0",
"axios": "^0.21.4"
}
},
"node_modules/@scrypted/sdk": {
@@ -139,6 +141,11 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/auth-header": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz",
"integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA=="
},
"node_modules/aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -153,11 +160,11 @@
"integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
},
"node_modules/axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dependencies": {
"follow-redirects": "^1.10.0"
"follow-redirects": "^1.14.0"
}
},
"node_modules/base-64": {
@@ -883,11 +890,12 @@
},
"dependencies": {
"@koush/axios-digest-auth": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.7.2.tgz",
"integrity": "sha512-gdO5pWjM9E1i+zgrDmHKc2pdrt5E335tzhtqvB3dj8IKTfT7dSIZTXPsqKgkN9UCMtKNcRVx5iBTNz4AOET91A==",
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.8.3.tgz",
"integrity": "sha512-KdVuBegM6lNtQkh9q27gitriUwYzr1FzZp1r90ueNA9iXqOzhSHip+JfFbwDc9qzzkQOLgs0PLUc/14SY6JxYQ==",
"requires": {
"axios": "0.21.1"
"auth-header": "^1.0.0",
"axios": "^0.21.4"
}
},
"@scrypted/sdk": {
@@ -905,6 +913,7 @@
"axios": "^0.21.4",
"babel-loader": "^8.2.3",
"babel-plugin-const-enum": "^1.1.0",
"esbuild": "^0.13.8",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"ts-loader": "^9.2.6",
@@ -973,6 +982,11 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"auth-header": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz",
"integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA=="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -984,11 +998,11 @@
"integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
},
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.10.0"
"follow-redirects": "^1.14.0"
}
},
"base-64": {

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/onvif",
"version": "0.0.38",
"version": "0.0.42",
"description": "ONVIF Camera Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
@@ -29,7 +29,7 @@
]
},
"dependencies": {
"@koush/axios-digest-auth": "^0.7.2",
"@koush/axios-digest-auth": "^0.8.3",
"@scrypted/sdk": "file:../../sdk",
"@types/node": "^16.9.1",
"base-64": "^1.0.0",

View File

@@ -100,6 +100,7 @@ class OnvifCamera extends RtspSmartCamera {
return ret;
}
catch (e) {
this.console.error('error retrieving onvif profiles', e);
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/rtsp",
"version": "0.0.32",
"version": "0.0.33",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/rtsp",
"version": "0.0.32",
"version": "0.0.33",
"license": "Apache",
"dependencies": {
"@koush/axios-digest-auth": "^0.7.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/rtsp",
"version": "0.0.32",
"version": "0.0.33",
"description": "RTSP Cameras and Streams Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -65,7 +65,7 @@ export class RtspCamera extends ScryptedDeviceBase implements Camera, VideoCamer
}
async getVideoStreamOptions(): Promise<RtspMediaStreamOptions[]> {
const vsos = (await this.getVideoStreamOptions()).filter(vso => this.isChannelEnabled(vso.id));
const vsos = this.getRtspVideoStreamOptions().filter(vso => this.isChannelEnabled(vso.id));
return vsos;
}