OptionalagentSupports things like https://www.npmjs.com/package/proxy-agent which provide SOCKS5 and other connections.
OptionalautoSet true if the camera should connect automatically, defaults false.
OptionaldefaultDefault for Onvif.connect { media } when that option is omitted.
OptionalhostnameDevice host. Required when url is omitted.
OptionalpasswordOptionalpathDevice service path. Defaults to /onvif/device_service.
OptionalportDefaults to 80 or 443 from useSecure / url scheme.
OptionalpreserveRewrite host/port on service and subscription XAddrs to this client's
hostname:port (pathname and query kept). Defaults to false.
Cameras often advertise unreachable XAddrs: 127.0.0.1 behind a vendor proxy,
a private LAN IP while you connect through NAT/port-forward, or a different
published port than the one you dial. Ordinary SOAP calls (device, media, ...)
always TCP to the constructor host/port and take only pathname (+ query) from
each XAddr - so they work without this flag. Set preserveAddress: true when
the full URL must match the constructor address as well:
a:To / addressing headers built from the XAddroptions.url from the
subscription AddressComparison uses the effective port (scheme defaults 80/443), not the empty
URL.port string. Does not rewrite raw RTSP/snapshot URI strings inside Media
responses - only URLs passed through Onvif.parseUrl.
OptionalsecureSet options for https like ca, cert, ciphers, rejectUnauthorized, secureOptions, secureProtocol, etc.
OptionaltimeoutHTTP socket timeout for ordinary SOAP calls, in milliseconds. Defaults to DEFAULT_TIMEOUT_MS (10 s). PullMessages sets its own longer timeout (pull wait + margin) and is not limited by this value.
OptionalurlDevice service URL (http(s)://host[:port]/path]).
Sets hostname, port, path, and useSecure. Must not include userinfo; use username/password.
OptionalurnOptionalusernameOptionaluseSet true if using https protocol, defaults to false. Ignored when url is set.
OptionaluseUse WS-Security SOAP headers
OptionalxaddrsAll XAddrs from WS-Discovery (set by Discovery).
Same role as v0.x cam.xaddrs.
Onvif constructor options. Pass either OnvifOptions.url or OnvifOptions.hostname (not both).