Class: Camera

Camera()

Wrapper class for all onvif modules to manage an Onvif device (camera).

Constructor

new Camera()

Source:

Methods

add(name)

Add a module to Camera. The available modules are:
  • access
  • accessrules
  • action
  • analytics - automatically added based on capabilities
  • core - automatically added
  • credential
  • deviceio
  • display
  • door
  • events - automatically added based on capabilities
  • imaging - automatically added based on capabilities
  • media - automatically added based on capabilities
  • media2
  • ptz - automatically added based on capabilities
  • receiver
  • recording
  • replay
  • schedule
  • search
  • security
  • snapshot
  • thermal
  • videoanalytics
Parameters:
Name Type Description
name string The name of the module.
Source:

connect(address, portopt, usernameopt, passwordopt, servicePathopt, callbackopt)

Connect with the specified camera
Parameters:
Name Type Attributes Description
address string The camera's address
port integer <optional>
Optional port (80 used if this is null)
username string <optional>
The username for the account on the camera. This is optional if your camera does not require a username.
password string <optional>
The password for the account on the camera. This is optional if your camera does not require a password.
servicePath string <optional>
The service path for the camera. If null or 'undefined' the default path according to the ONVIF spec will be used.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getDefaultProfile()

Returns the default profile that will be used when one is not supplied to functions that require it. Available after connection.
Source:

getInformation()

Returns the ONVIF device's informaton. Available after connection.
Source:

getProfiles()

Returns an array of profiles. Available after connection. The profiles will contain media stream URIs and snapshot URIs for each profile.
Source:

setAuth(usernameopt, passwordopt)

Used to change or remove the auth information for the camera.
Parameters:
Name Type Attributes Description
username string <optional>
The username for the account on the camera. This is optional if your camera does not require a username.
password string <optional>
The password for the account on the camera. This is optional if your camera does not require a password.
Source: