onvif
    Preparing search index...

    Variable DiscoveryConst

    Discovery: DiscoverySingleton = DiscoverySingleton.getInstance

    Singleton for the discovery to provide probe method Discovery.probe

    import { Discovery } from 'onvif';
    Discovery.on('device', async (cam) => {
    // function would be called as soon as NVT responses
    cam.username = <USERNAME>;
    cam.password = <PASSWORD>;
    await cam.connect();
    })
    Discovery.probe();
    import { Discovery } from 'onvif';
    (async () => {
    const cams = Promise.all((await Discovery.probe()).map(camera => camera.connect());
    console.log(await cams[0]?.getSystemDateAndTime());
    })();