Skip to content

Commit

Permalink
cameras: update onvif two way
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 27, 2024
1 parent 1238abe commit ec6d617
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion plugins/amcrest/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"port": 10081,
"request": "attach",
"skipFiles": [
"**/plugin-remote-worker.*",
"**/plugin-console.*",
"<node_internals>/**"
],
"preLaunchTask": "scrypted: deploy+debug",
Expand Down
4 changes: 2 additions & 2 deletions plugins/amcrest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/amcrest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.138",
"version": "0.0.140",
"description": "Amcrest Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
2 changes: 1 addition & 1 deletion plugins/amcrest/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ class AmcrestCamera extends RtspSmartCamera implements VideoCameraConfiguration,
method: 'POST',
headers: {
'Content-Type': contentType,
'Content-Length': '9999999'
'Content-Length': '9999999',
},
responseType: 'readable',
}, passthrough);
Expand Down
4 changes: 2 additions & 2 deletions plugins/hikvision/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/hikvision/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/hikvision",
"version": "0.0.142",
"version": "0.0.144",
"description": "Hikvision Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
4 changes: 2 additions & 2 deletions plugins/onvif/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/onvif/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/onvif",
"version": "0.1.10",
"version": "0.1.11",
"description": "ONVIF Camera Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
3 changes: 1 addition & 2 deletions plugins/onvif/src/onvif-intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class OnvifIntercom implements Intercom {
let transportDict: ReturnType<typeof parseSemicolonDelimited>;
let tcp = false;
try {
throw new Error()
const headers: any = {
Require,
Transport: `RTP/AVP;unicast;client_port=${rtp}-${rtcp}`,
Expand Down Expand Up @@ -98,7 +97,7 @@ export class OnvifIntercom implements Intercom {
this.camera.console.log('backchannel transport', transportDict);

const availableMatches = audioBackchannel.rtpmaps.filter(rtpmap => rtpmap.ffmpegEncoder);
const defaultMatch = audioBackchannel.rtpmaps.find(rtpmap => rtpmap.ffmpegEncoder);
const defaultMatch = audioBackchannel.rtpmaps.find(rtpmap => rtpmap.ffmpegEncoder === 'pcm_mulaw') || audioBackchannel.rtpmaps.find(rtpmap => rtpmap.ffmpegEncoder);

if (!defaultMatch)
throw new Error('no supported codec was found for back channel');
Expand Down

0 comments on commit ec6d617

Please sign in to comment.