3.4.1 • Published 5 months ago

camstreamerlib v3.4.1

Weekly downloads
4
License
ISC
Repository
github
Last release
5 months ago

CamStreamerLib

Node.js helper library for CamStreamer ACAP applications.

The library is primarily developed for the CamScripter ACAP application running directly in Axis cameras. Examples of CamScripter packages can be found at https://github.com/CamStreamer/CamScripterApp_examples

Installation

npm install camstreamerlib

Documentation for Node.js modules

For Developers

Publishing to npm repository

  1. Update version in package.json and push it
  2. Create git tag e.g. v1.2.4
  • git tag v1.2.4
  • git push --tags
  1. Publish new version to npm
  • npm publish ./dist
  1. Edit GitHub release form.

Preparing a package to upload to CamScripter

If you want to create your own package and upload it to CamScripter App, you can use the script CreatePackage. It creates a zip file which contains all required files and directories in your package folder. The script accepts source code written either in JavaScript or TypeScript if the package has the correct structure (more information in https://github.com/CamStreamer/CamScripterApp_examples/#readme). To include this script in your package add the following lines in the file package.json:

"scripts": {
    "create-package": "node node_modules/camstreamerlib/CreatePackage.js"
  }

By default, the zipped package does not contain node_modules directory. If you want to include it (required when uploading to CamScripter App on Axis camera), add -includeNodeModules or -i parameter.

If you need to exclude a file or directory add -exlude= or -e= parameter with comma separated list.

The zip package is created in the current directory. You can choose different location with the -where= or -w= option.

"scripts": {
    "create-package": "node node_modules/camstreamerlib/CreatePackage.js -i -e=react"
}

Breaking changes when moving from version 1.*.* to 2.*.*

  • Renamed file HTTPRequest.ts to HttpRequest.ts
  • Removed deprecated protocol attribute from all options objects (use tls instead).
  • Removed RTSP

    Previously CameraVapix.ts supported both WebSocket and RTSP. Starting with version 2.0.0, it supports WebSocket only.

  • ServiceID shouldn't be passed to CamOverlayAPI by the options object. Pass it as a parameter.
  • Renamed CamOverlayDrawingAPI event msg to message.
  • Drawing services extracted from CamOverlayAPI.ts to a separate file.

    Please read CamOverlayAPI and CamOverlayDrawingAPI for more information.

Breaking changes when moving from version 2.*.* to 3.*.*

  • CamStreamerlib requiers Node.js version 18 or higher.
  • CamOverlayDrawingAPI tries to reconnect when the websocket is closed. You don't have to do it manually.

    However, events open and close are still emitted in case you need to react to them.

  • Files common.ts, Digest.ts, HttpRequest.ts and WsClient.ts moved to a folder internal.
  • Removed function httpRequest(). Use sendRequest() instead. It uses the same interface except for the "noWaitForData" parameter.

    It returns (Response object)https://developer.mozilla.org/en-US/docs/Web/API/Response which doesn't contain data by default. If you need to wait for data, you can call for example the function await res.text(). This change affects the function vapixGet from (CameraVapix)doc/CameraVapix.md too.

3.4.0

5 months ago

3.4.1

5 months ago

3.3.1

6 months ago

3.3.2

6 months ago

3.3.0

7 months ago

3.2.4

7 months ago

3.2.2

10 months ago

3.2.3

9 months ago

3.2.1

10 months ago

3.2.0

11 months ago

3.1.0

11 months ago

3.0.0

11 months ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.3

1 year ago

2.0.4

1 year ago

1.9.1

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.9.0

2 years ago

1.8.8

2 years ago

1.8.7

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.2

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.7.6

2 years ago

1.7.5

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.4

3 years ago

1.7.1

3 years ago

1.6.2

3 years ago

1.7.0

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.6

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago