mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 08:42:19 +00:00
onvif: use the proper onvif port as detected
This commit is contained in:
4
plugins/onvif/package-lock.json
generated
4
plugins/onvif/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/onvif",
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.56",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/onvif",
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.56",
|
||||
"license": "Apache",
|
||||
"dependencies": {
|
||||
"@koush/axios-digest-auth": "^0.8.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/onvif",
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.56",
|
||||
"description": "ONVIF Camera Plugin for Scrypted",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache",
|
||||
|
||||
@@ -271,7 +271,9 @@ class OnvifProvider extends RtspProvider {
|
||||
interfaces: this.getInterfaces(),
|
||||
});
|
||||
const device = await this.getDevice(urn) as OnvifCamera;
|
||||
const onvifUrl = new URL(xaddrs)
|
||||
device.setIPAddress(rinfo.address);
|
||||
device.setHttpPortOverride(onvifUrl.port);
|
||||
this.log.a('Discovered ONVIF Camera. Complete setup by providing login credentials.');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -120,6 +120,7 @@ export class RtspCamera extends ScryptedDeviceBase implements Camera, VideoCamer
|
||||
url.password = password;
|
||||
|
||||
const ret: FFMpegInput = {
|
||||
url: url.toString(),
|
||||
inputArguments: [
|
||||
"-rtsp_transport",
|
||||
"tcp",
|
||||
@@ -434,6 +435,10 @@ export abstract class RtspSmartCamera extends RtspCamera {
|
||||
return `${this.getIPAddress()}:${this.storage.getItem('httpPort') || 80}`;
|
||||
}
|
||||
|
||||
setHttpPortOverride(port: string) {
|
||||
this.storage.setItem('httpPort', port);
|
||||
}
|
||||
|
||||
getRtspUrlOverride(options?: MediaStreamOptions) {
|
||||
if (!this.showRtspUrlOverride())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user