ReadonlyaccessLazy AccessControl service namespace.
ReadonlyaccessLazy AccessRules service namespace.
ReadonlyactionLazy ActionEngine service namespace.
OptionalactiveDefault AccessControl access-point token when methods omit token.
Filled by connect via GetAccessPointInfoList when AccessControl is advertised.
OptionalactiveDefault DoorControl door token when methods omit token.
Filled by connect via GetDoorInfoList when DoorControl is advertised.
OptionalactiveCurrently selected media pipeline defaults when methods omit tokens.
Token bags for usable media pipelines (typically one per video source after connect).
OptionalactiveDefault Recording job token when Recording job methods omit jobToken.
Filled by connect via GetRecordingJobs when Recording is advertised.
OptionalactiveDefault Recording token when Recording / Replay / Search omit recordingToken.
Filled by connect via GetRecordings when Recording is advertised.
OptionalactiveDefault DeviceIO relay output token when relay methods require a token.
Filled by connect via GetRelayOutputs when DeviceIO is advertised.
Not used for calls where omitting the token means "all relays".
ReadonlyadvancedLazy AdvancedSecurity service namespace.
ReadonlyanalyticsLazy Analytics service namespace.
ReadonlyanalyticsLazy AnalyticsDevice service namespace.
ReadonlyappLazy AppManagement service namespace.
ReadonlycredentialLazy Credential service namespace.
Default for connects media` option when omitted.
Callers (e.g. Discovery for access-only devices) may set OnvifOptions.defaultMedia.
OptionaldefaultReadonlydeviceLazy Device service namespace.
OptionaldeviceReadonlydeviceLazy DeviceIO service namespace.
ReadonlydisplayLazy Display service namespace.
ReadonlydoorLazy DoorControl service namespace.
ReadonlyeventsEager Events service (pull-point / WS-BaseNotification).
Hostname of the ONVIF device
ReadonlyimagingLazy Imaging service namespace.
Max SOAP response body size in bytes (see OnvifOptions.maxResponseBytes).
ReadonlymediaLazy Media service namespace.
Readonlymedia2Lazy Media2 service namespace.
Set during connect when the device advertises ONVIF Media2 (Profile T).
OptionalpasswordPassword for the connection
Path for the connection
Port for the connection
Profiles filled during connect (also copied onto Media when that module loads). Media1 shape; Media2-only devices store profiles mapped from Media2 GetProfiles.
ReadonlyprovisioningLazy Provisioning service namespace.
ReadonlyptzLazy PTZ service namespace.
ReadonlyreceiverLazy Receiver service namespace.
ReadonlyrecordingLazy Recording service namespace.
ReadonlyreplayLazy Replay service namespace.
ReadonlyscheduleLazy Schedule service namespace.
ReadonlysearchLazy Search service namespace.
Secure options for the connection
Filled by connect Device.getServices without loading the full Device module.
ReadonlythermalLazy Thermal service namespace.
OptionaltimeClock offset between the device and this host (ms), set during time sync.
ReadonlyuplinkLazy Uplink service namespace.
Optional ReadonlyurnOptionalusernameUsername for the connection
Indicates if the device is using secure connection
Use WS-Security for the connection (this is the default and adds security headers in the SOAP messages)
Video sources filled during connect (Media1 GetVideoSources or Media2 configuration fallback).
OptionalxaddrsAll XAddrs from WS-Discovery when this instance was found via Discovery.
Use activeMediaProfile.
Use activeMediaProfiles.
Close the client connection to the ONVIF device.
Call this when you are done talking to the camera and want to release the session: stop the pull-point event subscription (if any) and tear down the HTTP agents. Until then, the default keep-alive agent may keep TCP sockets open so later SOAP calls reuse them - which also keeps a Node process from exiting (common in short scripts and Jest).
What this method does:
event subscribe/unsubscribe hooks so later on('event') is a no-op.Call connect again to reopen via ensureOpen (new agents + hooks).
What it does not do: it is not an ONVIF "logout" RPC, and it does not destroy a
custom or shared agent passed via OnvifOptions.agent
(agent: false / non-Agent values are left alone). Safe to call more than once.
Connect to the camera and fill device information properties.
Pass { media: false } to skip profile / video-source discovery after GetServices.
When media is omitted, uses defaultMedia (usually true; Discovery may set
false for access-only door stations). Explicit { media: true | false } always wins.
After close, ensureOpen recreates owned agents and event hooks first.
Optionaloptions: ConnectOptionsBuild Digest Authorization header.
Prefers SHA-256 when both MD5 and SHA-256 challenges are present.
Public for v0.x Cam compatibility (digestAuth).
Rebuild activeAccessPointToken from AccessControl GetAccessPointInfoList.
Rebuild activeDoorToken from DoorControl GetDoorInfoList (first door).
Used by connect when DoorControl is advertised.
Rebuild door / access-point / recording / relay defaults (same probes as connect).
Rebuild activeMediaProfiles / activeMediaProfile from videoSources + profiles (used by connect).
Rebuild activeRecordingToken / activeRecordingJobToken from Recording lists.
Rebuild activeRelayOutputToken from DeviceIO GetRelayOutputs.
Receive only date and time from cam (old behaviour, returns only Date object)
Receive date and time from cam
Parse a device XAddr into a URL. When preserveAddress is set, replace host/port with the constructor values (path and query kept). Used when filling uri and for event subscription Addresses. For Media/Replay URI strings, use rewriteUri.
Rewrite a Media/Replay URI string from GetStreamUri / GetSnapshotUri / GetReplayUri /
etc. Host follows preserveAddress (or fills an empty host); stream port is
kept unless options.port is set. Does not force the SOAP constructor port onto RTSP.
Switch the default access point used when AccessControl methods omit token.
Switch the default Media Profile pipeline used when service methods omit tokens. Rebuilds activeMediaProfile (and syncs defaultProfile) from profiles. The profile must exist and reference a known video source when videoSources was loaded at connect.
Switch the default recording used when Recording / Replay / Search omit recordingToken.
Switch the default recording job used when Recording job methods omit jobToken.
Switch the default relay used when DeviceIO relay methods require a token.
Set the device system date and time Supports two possible date and time values: UTCDateTime(ONVIF types) or dateTime(js Date-object, preferred)
Increment Digest auth nonce count and return the padded nc value.
Public for v0.x Cam compatibility (updateNC).
Static ReadonlyCONNECTIndicates successfully connection connect
Static ReadonlyERRORIndicates any errors except pull-point / event subscription errors error
Static ReadonlyEVENTIndicates any event from Onvif device. event
Static ReadonlyEVENT_Indicates pull-point / event subscription errors eventError
Static ReadonlyRAW_Indicates raw xml request to device. rawRequest
Static ReadonlyRAW_Indicates raw xml response from device. rawResponse
Static ReadonlyREQUEST_Shows body of request
Static ReadonlyWARNIndicates any warnings warn
Main ONVIF client. Connect to a device, then use lazy service namespaces (
media,ptz, ...).Example: Connect, inspect the device, then stream and move PTZ: