ReadonlyaccessLazy AccessControl service namespace.
ReadonlyaccessLazy AccessRules service namespace.
ReadonlyactionLazy ActionEngine service namespace.
OptionalactiveCurrently selected media pipeline defaults when methods omit tokens.
Token bags for usable media pipelines (typically one per video source after connect).
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.
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 activeMediaProfiles / activeMediaProfile from videoSources + profiles (used by connect).
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 OnvifOptions.preserveAddress is set, replace host/port with the constructor values (path and query kept). Used when filling uri and for event subscription Addresses.
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.
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 events errors error
Static ReadonlyEVENTIndicates any event from Onvif device. event
Static ReadonlyEVENTS_Indicates events errors eventsError
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: