onvif
    Preparing search index...

    Class Onvif

    Hierarchy

    Index
    actionEngine: ActionEngine

    ActionEngine namespace for actionengine v1.0 methods

    const actionEngine = await onvif.actionEngine.getActionEngineConfiguration();
    console.log(actionEngine);
    activeSource?: ActiveSource
    agent: boolean | Agent | Agent
    analytics: Analytics

    Analytics namespace for analytics v1.0 methods

    const analytics = await onvif.analytics.getAnalyticsConfiguration();
    console.log(analytics);
    capabilities: Capabilities
    defaultProfile?: Profile
    defaultProfiles: Profile[] = []
    device: Device

    Core device namespace for device v1.0 methods

    const date = await onvif.device.getSystemDateAndTime();
    console.log(date.toLocaleString());
    deviceInformation?: GetDeviceInformationResponse
    deviceIO: DeviceIO

    DeviceIO namespace for deviceio v1.0 methods

    const deviceIO = await onvif.deviceIO.getDeviceIOConfiguration();
    console.log(deviceIO);
    display: Display

    Display namespace for display v1.0 methods

    const display = await onvif.display.getDisplayConfiguration();
    console.log(display);
    doorControl: DoorControl

    DoorControl namespace for doorcontrol v1.0 methods

    const doorControl = await onvif.doorControl.getDoorControlConfiguration();
    console.log(doorControl);
    events: Events

    Events namespace for events v1.0 methods

    onvif.on('event', (msg) => { console.log('-> request was', xml); });
    
    hostname: string

    Hostname of the ONVIF device

    imaging: Imaging

    Imaging namespace for imaging v1.0 methods

    const imaging = await onvif.imaging.getImagingSettings();
    console.log(imaging);
    media: Media

    Media namespace for media v1.0 methods

    const profiles = await onvif.media.getProfiles();
    console.log(profiles);
    media2: Media2

    Media2 namespace for media2 v1.0 methods

    const profiles = await onvif.media2.getProfiles();
    console.log(profiles);
    password?: string

    Password for the connection

    path: string

    Path for the connection

    port: number

    Port for the connection

    preserveAddress: boolean = false
    ptz: PTZ

    PTZ namespace for ptz v1.0 methods

    const ptz = await onvif.ptz.getPTZStatus();
    console.log(ptz);
    recording: Recording

    Recording namespace for recording v1.0 methods

    const recording = await onvif.recording.getRecordingConfiguration();
    console.log(recording);
    replay: Replay

    Replay namespace for replay v1.0 methods

    const replay = await onvif.replay.getReplayConfiguration();
    console.log(replay);
    secureOptions: SecureContextOptions

    Secure options for the connection

    timeout: number
    urn?: string
    username?: string

    Username for the connection

    useSecure: boolean

    Indicates if the device is using secure connection

    useWSSecurity: boolean

    Use WS-Security for the connection (this is the default and adds security headers in the SOAP messages)

    • Connect to the camera and fill device information properties

      Returns Promise<Onvif>

    • Returns { _: string; $: { "xmlns:xsd": string; "xmlns:xsi": string } }

    • Receive only date and time from cam (old behaviour, returns only Date object)

      Returns Promise<Date>

    CONNECT: "connect" = 'connect'

    Indicates successfully connection connect

    onvif.on('connect', () => console.log('connected!'));
    
    ERROR: "error" = 'error'

    Indicates any errors except events errors error

    onvif.on('error', console.error);
    
    EVENT: "event" = 'event'

    Indicates any event from Onvif device. event

    onvif.on('event', (msg) => { console.log('-> request was', xml); });
    
    EVENTS_ERROR: "eventsError" = 'eventsError'

    Indicates events errors eventsError

    onvif.on('eventsError', console.error);
    
    RAW_REQUEST: "rawRequest" = 'rawRequest'

    Indicates raw xml request to device. rawRequest

    onvif.on('rawRequest', (xml) => { console.log('-> request was', xml); });
    
    RAW_RESPONSE: "rawResponse" = 'rawResponse'

    Indicates raw xml response from device. rawResponse

    onvif.on('rawResponse', (xml) => { console.log('<- response was', xml); });
    
    REQUEST_BODY: "requestBody" = 'requestBody'

    Shows body of request

    WARN: "warn" = 'warn'

    Indicates any warnings warn

    onvif.on('warn', console.warn);