camstreamerlib 4.0.0-beta.119 → 4.0.0-beta.120
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/cjs/CamOverlayAPI.d.ts +83 -91
- package/cjs/CamOverlayAPI.js +10 -62
- package/cjs/CamScripterAPI.d.ts +4 -8
- package/cjs/CamScripterAPI.js +4 -29
- package/cjs/CamStreamerAPI.d.ts +1427 -1596
- package/cjs/CamStreamerAPI.js +7 -76
- package/cjs/CamSwitcherAPI.d.ts +18 -21
- package/cjs/CamSwitcherAPI.js +5 -26
- package/cjs/PlaneTrackerAPI.d.ts +9 -15
- package/cjs/PlaneTrackerAPI.js +6 -69
- package/cjs/internal/BasicAPI.d.ts +15 -0
- package/cjs/internal/BasicAPI.js +97 -0
- package/cjs/internal/versionCompare.d.ts +2 -2
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +296 -296
- package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +6 -6
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +26 -26
- package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +6 -6
- package/cjs/types/CamOverlayAPI/pipSchema.d.ts +6 -6
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +6 -6
- package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +11 -11
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +6 -6
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +12 -12
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +6 -6
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +7796 -9156
- package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +146 -174
- package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +22 -22
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +140 -168
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +22 -32
- package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +2513 -3017
- package/cjs/types/CamStreamerAPI/windySchema.d.ts +138 -166
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +148 -176
- package/cjs/types/CamSwitcherAPI.d.ts +66 -66
- package/cjs/types/PlaneTrackerAPI.d.ts +12 -12
- package/cjs/types/ws/CamStreamerEvents.d.ts +8 -8
- package/cjs/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/esm/CamOverlayAPI.js +11 -63
- package/esm/CamScripterAPI.js +4 -29
- package/esm/CamStreamerAPI.js +8 -77
- package/esm/CamSwitcherAPI.js +6 -27
- package/esm/PlaneTrackerAPI.js +7 -70
- package/esm/internal/BasicAPI.js +93 -0
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +22 -32
- package/package.json +1 -1
- package/types/CamOverlayAPI.d.ts +83 -91
- package/types/CamScripterAPI.d.ts +4 -8
- package/types/CamStreamerAPI.d.ts +1427 -1596
- package/types/CamSwitcherAPI.d.ts +18 -21
- package/types/PlaneTrackerAPI.d.ts +9 -15
- package/types/internal/BasicAPI.d.ts +15 -0
- package/types/internal/versionCompare.d.ts +2 -2
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +296 -296
- package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +6 -6
- package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +26 -26
- package/types/types/CamOverlayAPI/imagesSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/infotickerSchema.d.ts +6 -6
- package/types/types/CamOverlayAPI/pipSchema.d.ts +6 -6
- package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +6 -6
- package/types/types/CamOverlayAPI/ptzSchema.d.ts +11 -11
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +6 -6
- package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +12 -12
- package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +6 -6
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +7796 -9156
- package/types/types/CamStreamerAPI/facebookSchema.d.ts +146 -174
- package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +22 -22
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +140 -168
- package/types/types/CamStreamerAPI/streamsSchema.d.ts +2513 -3017
- package/types/types/CamStreamerAPI/windySchema.d.ts +138 -166
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +148 -176
- package/types/types/CamSwitcherAPI.d.ts +66 -66
- package/types/types/PlaneTrackerAPI.d.ts +12 -12
- package/types/types/ws/CamStreamerEvents.d.ts +8 -8
- package/types/types/ws/CamSwitcherEvents.d.ts +8 -8
package/cjs/CamScripterAPI.js
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CamScripterAPI = void 0;
|
|
4
|
-
const
|
|
5
|
-
const ProxyClient_1 = require("./internal/ProxyClient");
|
|
4
|
+
const BasicAPI_1 = require("./internal/BasicAPI");
|
|
6
5
|
const CamScripterAPI_1 = require("./types/CamScripterAPI");
|
|
7
6
|
const common_1 = require("./types/common");
|
|
8
7
|
const BASE_PATH = '/local/camscripter';
|
|
9
|
-
class CamScripterAPI {
|
|
10
|
-
client;
|
|
11
|
-
constructor(client) {
|
|
12
|
-
this.client = client;
|
|
13
|
-
}
|
|
8
|
+
class CamScripterAPI extends BasicAPI_1.BasicAPI {
|
|
14
9
|
static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
|
|
15
|
-
getClient(proxyParams) {
|
|
16
|
-
return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
|
|
17
|
-
}
|
|
18
10
|
async checkAPIAvailable(options) {
|
|
19
11
|
await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
|
|
20
12
|
}
|
|
@@ -59,25 +51,8 @@ class CamScripterAPI {
|
|
|
59
51
|
async installNodejs(storage, options) {
|
|
60
52
|
await this._getJson(`${BASE_PATH}/node_update.cgi`, { storage: storage }, options);
|
|
61
53
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const res = await agent.get({ path, parameters, timeout: options?.timeout });
|
|
65
|
-
if (res.ok) {
|
|
66
|
-
return await res.json();
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
throw new errors_1.ErrorWithResponse(res);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async _post(path, data, parameters, options, headers) {
|
|
73
|
-
const agent = this.getClient(options?.proxyParams);
|
|
74
|
-
const res = await agent.post({ path, data, parameters, headers, timeout: options?.timeout });
|
|
75
|
-
if (res.ok) {
|
|
76
|
-
return await res.json();
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
throw new errors_1.ErrorWithResponse(res);
|
|
80
|
-
}
|
|
54
|
+
downloadReport(options) {
|
|
55
|
+
return this._getText(`${BASE_PATH}/report.cgi`, undefined, options);
|
|
81
56
|
}
|
|
82
57
|
}
|
|
83
58
|
exports.CamScripterAPI = CamScripterAPI;
|