Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.44 KB

File metadata and controls

44 lines (29 loc) · 1.44 KB

@2bad/onvif

High-performance ONVIF client for TypeScript with no runtime dependencies.

Warning

2.0 is in alpha. The API can still change. The 1.0.0-beta releases on npm are the old implementation and are no longer maintained.

Packages

Example

import { Device, DeviceManagement } from '@2bad/onvif'

const device = await Device.connect({ hostname: '192.0.2.10', username: 'admin', password: 'secret' })
const info = await device.call(DeviceManagement.GetDeviceInformation)
console.log(info.manufacturer, info.model)

Performance

Compared with onvif 0.8.3 and 1.0.0-rc.3 on the same machine:

@2bad/onvif onvif
Event responses decoded per second 11,400 3,500 3.3x faster
Time for a burst of 5,000 events 194 ms 1,315 ms 6.8x faster
CPU time for 5,000 events 281 ms 892 ms 3.2x less

Snapshots are up to 2.6x faster than plain fetch.

Security

  • Credentials are never exposed
  • TLS certificate pinning
  • No runtime dependencies

License

MIT