UNPKG
onvif-ptz-cli
Version:
latest (2.0.0)
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
0.6.0
Node.js cli tool for controlling PTZ cameras via the ONVIF protocol.
onvif-ptz-cli
/
lib
/
onvif
/
device.js
13 lines
(10 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
onvif
from
"node-onvif"
;
export
async
function
createDevice
(
{ baseUrl, path, username, password }
) {
const
device =
new
onvif.
OnvifDevice
({
xaddr
: baseUrl + path,
user
: username,
pass
: password, });
await
device.
init
();
return
device; }