camstreamerlib 4.0.0-beta.99 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -15
- package/cjs/CamOverlayAPI.d.ts +145 -107
- package/cjs/CamOverlayAPI.js +14 -63
- package/cjs/CamScripterAPI.d.ts +5 -8
- package/cjs/CamScripterAPI.js +11 -29
- package/cjs/CamStreamerAPI.d.ts +2362 -806
- package/cjs/CamStreamerAPI.js +68 -76
- package/cjs/CamSwitcherAPI.d.ts +23 -22
- package/cjs/CamSwitcherAPI.js +30 -88
- package/cjs/PlaneTrackerAPI.d.ts +28 -30
- package/cjs/PlaneTrackerAPI.js +20 -75
- package/cjs/VapixAPI.d.ts +36 -23
- package/cjs/VapixAPI.js +227 -106
- package/cjs/errors/errors.d.ts +11 -5
- package/cjs/errors/errors.js +5 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/internal/BasicAPI.d.ts +15 -0
- package/cjs/internal/BasicAPI.js +93 -0
- package/cjs/internal/WsEvents.d.ts +1 -0
- package/cjs/internal/WsEvents.js +5 -0
- package/cjs/internal/constants.d.ts +1 -0
- package/cjs/internal/constants.js +2 -1
- package/cjs/internal/convertors.d.ts +6 -0
- package/cjs/internal/convertors.js +115 -0
- package/cjs/internal/transformers.js +8 -8
- package/cjs/internal/types.d.ts +3 -0
- package/cjs/internal/versionCompare.d.ts +2 -2
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +878 -358
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +54 -11
- package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +28 -28
- package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
- package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +21 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/index.d.ts +1 -0
- package/cjs/types/CamOverlayAPI/index.js +1 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/pipSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +13 -13
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +17 -16
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +6 -3
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +8 -8
- package/cjs/types/CamScripterAPI.d.ts +0 -11
- package/cjs/types/CamScripterAPI.js +1 -5
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +17745 -4940
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +126 -57
- package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +395 -86
- package/cjs/types/CamStreamerAPI/facebookSchema.js +13 -1
- package/cjs/types/CamStreamerAPI/index.d.ts +1 -3
- package/cjs/types/CamStreamerAPI/index.js +1 -3
- package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +47 -47
- package/cjs/types/CamStreamerAPI/oldStreamSchema.js +1 -1
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +392 -304
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +116 -76
- package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +8812 -0
- package/cjs/types/CamStreamerAPI/streamsSchema.js +81 -0
- package/cjs/types/CamStreamerAPI/windySchema.d.ts +356 -87
- package/cjs/types/CamStreamerAPI/windySchema.js +9 -1
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +351 -119
- package/cjs/types/CamStreamerAPI/youtubeSchema.js +5 -9
- package/cjs/types/CamSwitcherAPI.d.ts +96 -91
- package/cjs/types/CamSwitcherAPI.js +9 -9
- package/cjs/types/GenetecAgent.d.ts +2 -2
- package/cjs/types/PlaneTrackerAPI.d.ts +60 -47
- package/cjs/types/PlaneTrackerAPI.js +5 -2
- package/cjs/types/VapixAPI.d.ts +51 -32
- package/cjs/types/VapixAPI.js +10 -3
- package/cjs/types/common.d.ts +27 -0
- package/cjs/types/common.js +13 -1
- package/cjs/types/ws/CamStreamerEvents.d.ts +110 -77
- package/cjs/types/ws/CamStreamerEvents.js +11 -7
- package/cjs/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +3 -3
- package/esm/CamOverlayAPI.js +16 -65
- package/esm/CamScripterAPI.js +9 -30
- package/esm/CamStreamerAPI.js +70 -78
- package/esm/CamSwitcherAPI.js +31 -89
- package/esm/PlaneTrackerAPI.js +21 -76
- package/esm/VapixAPI.js +228 -107
- package/esm/errors/errors.js +5 -1
- package/esm/index.js +1 -0
- package/esm/internal/BasicAPI.js +89 -0
- package/esm/internal/WsEvents.js +5 -0
- package/esm/internal/constants.js +1 -0
- package/esm/internal/convertors.js +108 -0
- package/esm/internal/transformers.js +1 -1
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +47 -10
- package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +18 -0
- package/esm/types/CamOverlayAPI/index.js +1 -0
- package/esm/types/CamOverlayAPI/serviceCommonTypes.js +6 -3
- package/esm/types/CamScripterAPI.js +0 -4
- package/esm/types/CamStreamerAPI/CamStreamerAPI.js +109 -41
- package/esm/types/CamStreamerAPI/facebookSchema.js +13 -1
- package/esm/types/CamStreamerAPI/index.js +1 -3
- package/esm/types/CamStreamerAPI/oldStreamSchema.js +1 -1
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +116 -76
- package/esm/types/CamStreamerAPI/streamsSchema.js +75 -0
- package/esm/types/CamStreamerAPI/windySchema.js +9 -1
- package/esm/types/CamStreamerAPI/youtubeSchema.js +5 -9
- package/esm/types/CamSwitcherAPI.js +8 -8
- package/esm/types/PlaneTrackerAPI.js +5 -2
- package/esm/types/VapixAPI.js +9 -2
- package/esm/types/common.js +12 -0
- package/esm/types/ws/CamStreamerEvents.js +11 -7
- package/package.json +4 -4
- package/types/CamOverlayAPI.d.ts +145 -107
- package/types/CamScripterAPI.d.ts +5 -8
- package/types/CamStreamerAPI.d.ts +2362 -806
- package/types/CamSwitcherAPI.d.ts +23 -22
- package/types/PlaneTrackerAPI.d.ts +28 -30
- package/types/VapixAPI.d.ts +36 -23
- package/types/errors/errors.d.ts +11 -5
- package/types/index.d.ts +1 -0
- package/types/internal/BasicAPI.d.ts +15 -0
- package/types/internal/WsEvents.d.ts +1 -0
- package/types/internal/constants.d.ts +1 -0
- package/types/internal/convertors.d.ts +6 -0
- package/types/internal/types.d.ts +3 -0
- package/types/internal/versionCompare.d.ts +2 -2
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +878 -358
- package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +28 -28
- package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
- package/types/types/CamOverlayAPI/imagesSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/index.d.ts +1 -0
- package/types/types/CamOverlayAPI/infotickerSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/pipSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/ptzSchema.d.ts +13 -13
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +17 -16
- package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +8 -8
- package/types/types/CamScripterAPI.d.ts +0 -11
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +17745 -4940
- package/types/types/CamStreamerAPI/facebookSchema.d.ts +395 -86
- package/types/types/CamStreamerAPI/index.d.ts +1 -3
- package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +47 -47
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +392 -304
- package/types/types/CamStreamerAPI/streamsSchema.d.ts +8812 -0
- package/types/types/CamStreamerAPI/windySchema.d.ts +356 -87
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +351 -119
- package/types/types/CamSwitcherAPI.d.ts +96 -91
- package/types/types/GenetecAgent.d.ts +2 -2
- package/types/types/PlaneTrackerAPI.d.ts +60 -47
- package/types/types/VapixAPI.d.ts +51 -32
- package/types/types/common.d.ts +27 -0
- package/types/types/ws/CamStreamerEvents.d.ts +110 -77
- package/types/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/types/types/ws/PlaneTrackerEvents.d.ts +3 -3
- package/cjs/types/CamStreamerAPI/churchSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/churchSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/daCastSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/daCastSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/dailymotionSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/gameChangerSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/hlsPullSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/hlsPushSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/ibmSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/ibmSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/microsoftAzureSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/microsoftStreamSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +0 -323
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.js +0 -27
- package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +0 -284
- package/cjs/types/CamStreamerAPI/rtmpSchema.js +0 -14
- package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/sdCardSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/srtSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/srtSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/twitchSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/twitchSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/vimeoSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/vimeoSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/wowzaSchema.d.ts +0 -275
- package/cjs/types/CamStreamerAPI/wowzaSchema.js +0 -11
- package/esm/types/CamStreamerAPI/churchSchema.js +0 -5
- package/esm/types/CamStreamerAPI/daCastSchema.js +0 -5
- package/esm/types/CamStreamerAPI/dailymotionSchema.js +0 -5
- package/esm/types/CamStreamerAPI/gameChangerSchema.js +0 -5
- package/esm/types/CamStreamerAPI/hlsPullSchema.js +0 -5
- package/esm/types/CamStreamerAPI/hlsPushSchema.js +0 -5
- package/esm/types/CamStreamerAPI/ibmSchema.js +0 -5
- package/esm/types/CamStreamerAPI/microsoftAzureSchema.js +0 -5
- package/esm/types/CamStreamerAPI/microsoftStreamSchema.js +0 -5
- package/esm/types/CamStreamerAPI/mpegDvbSchema.js +0 -21
- package/esm/types/CamStreamerAPI/rtmpSchema.js +0 -8
- package/esm/types/CamStreamerAPI/sdCardSchema.js +0 -5
- package/esm/types/CamStreamerAPI/srtSchema.js +0 -5
- package/esm/types/CamStreamerAPI/twitchSchema.js +0 -5
- package/esm/types/CamStreamerAPI/vimeoSchema.js +0 -5
- package/esm/types/CamStreamerAPI/wowzaSchema.js +0 -5
- package/types/types/CamStreamerAPI/churchSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/daCastSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/ibmSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +0 -323
- package/types/types/CamStreamerAPI/rtmpSchema.d.ts +0 -284
- package/types/types/CamStreamerAPI/sdCardSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/srtSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/twitchSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/vimeoSchema.d.ts +0 -275
- package/types/types/CamStreamerAPI/wowzaSchema.d.ts +0 -275
package/README.md
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
# CamStreamerLib
|
|
1
|
+
# CamStreamerLib
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Web and Node.js helper library for CamStreamer ACAP applications.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Node.js helper library for CamStreamer ACAP applications.
|
|
8
|
-
|
|
9
|
-
The library is primarily developed for the CamScripter ACAP application running directly in Axis cameras.
|
|
10
|
-
Examples of CamScripter packages can be found at https://github.com/CamStreamer/CamScripterApp_examples
|
|
5
|
+
The library is primarily developed for ACAP applications running directly in Axis cameras.
|
|
11
6
|
|
|
12
7
|
## Installation
|
|
13
8
|
|
|
@@ -26,7 +21,7 @@ npm install camstreamerlib
|
|
|
26
21
|
| [CamSwitcherAPI](doc/CamSwitcherAPI.md) | Module to access CamSwitcher API. |
|
|
27
22
|
| [PlaneTrackerAPI](doc/PlaneTrackerAPI.md) | Module to access PlaneTracker API. |
|
|
28
23
|
| [CamStreamerEvents](doc/ws/CamStreamerEvents.md) | Module which allows receiving events from CamStreamer ACAP application. |
|
|
29
|
-
| [
|
|
24
|
+
| [CamOverlayEvents](doc/ws/CamOverlayEvents.md) | Module which allows receiving events from CamOverlay ACAP application. |
|
|
30
25
|
| [CamSwitcherEvents](doc/ws/CamSwitcherEvents.md) | Module which allows receiving events from CamSwitcher ACAP application. |
|
|
31
26
|
| [PlaneTrackerEvents](doc/ws/PlaneTrackerEvents.md) | Module which allows receiving events from PlaneTracker ACAP application. |
|
|
32
27
|
|
|
@@ -56,11 +51,11 @@ npm install camstreamerlib
|
|
|
56
51
|
|
|
57
52
|
### ACAP API Class Constructors Updated
|
|
58
53
|
|
|
59
|
-
All ACAP API classes now **require a client instance to be passed into their constructors** instead of options object.
|
|
54
|
+
All ACAP API classes now **require a client instance to be passed into their constructors** instead of `options` object.
|
|
60
55
|
|
|
61
56
|
- This change improves flexibility by allowing you to use either the Node or Web client, depending on your environment.
|
|
62
57
|
|
|
63
|
-
Example (before → now)
|
|
58
|
+
**Example (before → now)**:
|
|
64
59
|
|
|
65
60
|
```typescript
|
|
66
61
|
// Before
|
|
@@ -78,6 +73,12 @@ const coApi = new CamOverlayAPI({
|
|
|
78
73
|
import { DefaultClient } from 'camstreamerlib/web';
|
|
79
74
|
import { CamOverlayAPI } from 'camstreamerlib';
|
|
80
75
|
|
|
76
|
+
// Use DefaultClient in constructor
|
|
77
|
+
const coApi = new CamOverlayAPI(
|
|
78
|
+
new DefaultClient()
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
// Or adjust DefaultClient default values with your own
|
|
81
82
|
const coApi = new CamOverlayAPI(
|
|
82
83
|
new DefaultClient({
|
|
83
84
|
tls: false,
|
|
@@ -109,17 +110,43 @@ import { Painter } from 'camstreamerlib/node';
|
|
|
109
110
|
import { DefaultClient } from 'camstreamerlib/web';
|
|
110
111
|
```
|
|
111
112
|
|
|
112
|
-
> Note: To ensure compatibility, set the module resolution in your projects tsconfig.json to `"moduleResolution": "bundler"`.
|
|
113
|
+
> :information_source: Note: To ensure compatibility, set the module resolution in your web projects tsconfig.json to `"moduleResolution": "bundler"`.
|
|
113
114
|
|
|
114
|
-
###
|
|
115
|
+
### Classes and Methods Refactored
|
|
115
116
|
|
|
116
117
|
- **CameraVapix API** has been renamed to [**VapixAPI**](doc/VapixAPI.md).
|
|
117
118
|
- **DefaultAgent** has been refactored into two separate classes - one for node, one for web as [**DefaultClient**](doc/Client.md)
|
|
118
119
|
- Several method names and parameter names across the library have been updated for consistency and clarity.
|
|
120
|
+
- New API modules and endpoints have been introduced, providing extended functionality and better coverage of the underlying service.
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
### Stream List Migration
|
|
121
123
|
|
|
122
|
-
-
|
|
124
|
+
- `CamStreamerAPI.getStreamList()` and `getStream()` now throw a **`MigrationError`** when old-format (v3) stream data is detected on the camera.
|
|
125
|
+
- `MigrationError` provides four arrays to help you handle the transition: `.valid`, `.old`, `.invalid`, and `.unknown`.
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { MigrationError } from 'camstreamerlib';
|
|
129
|
+
|
|
130
|
+
try {
|
|
131
|
+
const streams = await csApi.getStreamList();
|
|
132
|
+
} catch (e) {
|
|
133
|
+
if (e instanceof MigrationError) {
|
|
134
|
+
console.log('Valid streams:', e.valid);
|
|
135
|
+
console.log('Old-format streams needing migration:', e.old);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### CreatePackage Script Path Changed
|
|
141
|
+
|
|
142
|
+
- The path to the `CreatePackage` script changed from `camstreamerlib/CreatePackage.js` to `camstreamerlib/bin/CreatePackage.js`.
|
|
143
|
+
- Update any `package.json` scripts accordingly:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
"scripts": {
|
|
147
|
+
"create-package": "node node_modules/camstreamerlib/bin/CreatePackage.js"
|
|
148
|
+
}
|
|
149
|
+
```
|
|
123
150
|
|
|
124
151
|
<hr/>
|
|
125
152
|
</details>
|
|
@@ -204,3 +231,5 @@ The zip package is created in the current directory. You can choose different lo
|
|
|
204
231
|
"create-package": "node node_modules/camstreamerlib/bin/CreatePackage.js -i -e=react"
|
|
205
232
|
}
|
|
206
233
|
```
|
|
234
|
+
|
|
235
|
+
> :warning: Path to `CreatePackage` script has changed from `camstreamerlib/CreatePackage.js` to `camstreamerlib/bin/CreatePackage.js` (from v.4.0.0)
|