camstreamerlib 4.0.0-beta.127 → 4.0.0-beta.129
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/CamStreamerAPI.d.ts +16 -2
- package/cjs/CamStreamerAPI.js +5 -1
- package/cjs/VapixAPI.d.ts +2 -1
- package/cjs/VapixAPI.js +12 -4
- package/cjs/internal/BasicAPI.js +4 -8
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +44 -3
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +19 -5
- package/esm/CamStreamerAPI.js +6 -2
- package/esm/VapixAPI.js +13 -5
- package/esm/internal/BasicAPI.js +4 -8
- package/esm/types/CamStreamerAPI/CamStreamerAPI.js +18 -4
- package/package.json +1 -1
- package/types/CamStreamerAPI.d.ts +16 -2
- package/types/VapixAPI.d.ts +2 -1
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +44 -3
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -3110,12 +3110,26 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
3110
3110
|
streamIdentifier?: string | undefined;
|
|
3111
3111
|
}>;
|
|
3112
3112
|
setStream(streamId: string, streamData: TStream, options?: THttpRequestOptions): Promise<void>;
|
|
3113
|
-
|
|
3113
|
+
getStreamNetworkStatistics(streamId: string, options?: THttpRequestOptions): Promise<{
|
|
3114
3114
|
net_stats: string;
|
|
3115
3115
|
stream_bytes_time_ms: number;
|
|
3116
3116
|
stream_bytes: number;
|
|
3117
3117
|
start_count: number;
|
|
3118
|
-
is_streaming:
|
|
3118
|
+
is_streaming: 0 | 1;
|
|
3119
|
+
}>;
|
|
3120
|
+
getSrtStreamStatistics(streamId: string, options?: THttpRequestOptions): Promise<{
|
|
3121
|
+
msTimeStamp: number;
|
|
3122
|
+
pktSentTotal: number;
|
|
3123
|
+
byteSentTotal: number;
|
|
3124
|
+
pktRetransTotal: number;
|
|
3125
|
+
byteRetransTotal: number;
|
|
3126
|
+
pktSndDropTotal: number;
|
|
3127
|
+
byteSndDropTotal: number;
|
|
3128
|
+
mbpsSendRate: number;
|
|
3129
|
+
mbpsBandwidth: number;
|
|
3130
|
+
mbpsMaxBW: number;
|
|
3131
|
+
msRTT: number;
|
|
3132
|
+
msSndBuf: number;
|
|
3119
3133
|
}>;
|
|
3120
3134
|
setStreamEnabled(streamId: string, enabled: boolean, options?: THttpRequestOptions): Promise<void>;
|
|
3121
3135
|
setStreamActive(streamId: string, active: boolean, options?: THttpRequestOptions): Promise<void>;
|
package/cjs/CamStreamerAPI.js
CHANGED
|
@@ -91,10 +91,14 @@ class CamStreamerAPI extends BasicAPI_1.BasicAPI {
|
|
|
91
91
|
stream_id: streamId,
|
|
92
92
|
}, options);
|
|
93
93
|
}
|
|
94
|
-
async
|
|
94
|
+
async getStreamNetworkStatistics(streamId, options) {
|
|
95
95
|
const res = await this._getJson(`${BASE_PATH}/get_streamstat.cgi`, { stream_id: streamId }, options);
|
|
96
96
|
return CamStreamerAPI_1.streamStatsSchema.parse(res.data);
|
|
97
97
|
}
|
|
98
|
+
async getSrtStreamStatistics(streamId, options) {
|
|
99
|
+
const res = await this._getJson(`${BASE_PATH}/srt_statistics.cgi`, { stream_id: streamId }, options);
|
|
100
|
+
return CamStreamerAPI_1.srtStreamStatisticsSchema.parse(res.data);
|
|
101
|
+
}
|
|
98
102
|
async setStreamEnabled(streamId, enabled, options) {
|
|
99
103
|
await this._postUrlEncoded(`${BASE_PATH}/set_stream_enabled.cgi`, { stream_id: streamId, enabled: enabled ? 1 : 0 }, options);
|
|
100
104
|
}
|
package/cjs/VapixAPI.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IClient, TResponse } from './internal/types';
|
|
1
|
+
import { IClient, TParameters, TResponse } from './internal/types';
|
|
2
2
|
import { TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
|
|
3
3
|
import { TCameraImageConfig, THttpRequestOptions } from './types/common';
|
|
4
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
@@ -8,6 +8,7 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
8
8
|
new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
|
|
9
9
|
prototype: FormData;
|
|
10
10
|
});
|
|
11
|
+
postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
11
12
|
postJson: (path: string, data: Record<string, any>, headers?: Record<string, string>, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
12
13
|
getCameraImage(parameters: TCameraImageConfig, options?: THttpRequestOptions): Promise<ReturnType<Client["get"]>>;
|
|
13
14
|
getEventDeclarations(options?: THttpRequestOptions): Promise<string>;
|
package/cjs/VapixAPI.js
CHANGED
|
@@ -13,6 +13,16 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
|
|
|
13
13
|
super(client);
|
|
14
14
|
this.CustomFormData = CustomFormData;
|
|
15
15
|
}
|
|
16
|
+
async postUrlEncoded(path, parameters, headers, options) {
|
|
17
|
+
const data = (0, utils_1.paramToUrl)(parameters);
|
|
18
|
+
const head = { ...headers, 'Content-Type': 'application/x-www-form-urlencoded' };
|
|
19
|
+
const agent = this.getClient(options?.proxyParams);
|
|
20
|
+
const res = await agent.post({ path, data, headers: head, timeout: options?.timeout });
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
throw new errors_1.ErrorWithResponse(res);
|
|
23
|
+
}
|
|
24
|
+
return res;
|
|
25
|
+
}
|
|
16
26
|
postJson = async (path, data, headers, options) => {
|
|
17
27
|
const agent = this.getClient(options?.proxyParams);
|
|
18
28
|
const jsonData = JSON.stringify(data);
|
|
@@ -22,12 +32,10 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
|
|
|
22
32
|
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
23
33
|
timeout: options?.timeout,
|
|
24
34
|
});
|
|
25
|
-
if (res.ok) {
|
|
26
|
-
return res;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
35
|
+
if (!res.ok) {
|
|
29
36
|
throw new errors_1.ErrorWithResponse(res);
|
|
30
37
|
}
|
|
38
|
+
return res;
|
|
31
39
|
};
|
|
32
40
|
async getCameraImage(parameters, options) {
|
|
33
41
|
const agent = this.getClient(options?.proxyParams);
|
package/cjs/internal/BasicAPI.js
CHANGED
|
@@ -70,12 +70,10 @@ class BasicAPI {
|
|
|
70
70
|
headers: { 'Content-Type': 'application/json' },
|
|
71
71
|
timeout: options?.timeout,
|
|
72
72
|
});
|
|
73
|
-
if (res.ok) {
|
|
74
|
-
return res;
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
73
|
+
if (!res.ok) {
|
|
77
74
|
throw new errors_1.ErrorWithResponse(res);
|
|
78
75
|
}
|
|
76
|
+
return res;
|
|
79
77
|
}
|
|
80
78
|
async _postUrlEncoded(path, data, options) {
|
|
81
79
|
const encodedData = (0, utils_1.paramToUrl)(data);
|
|
@@ -86,12 +84,10 @@ class BasicAPI {
|
|
|
86
84
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
87
85
|
timeout: options?.timeout,
|
|
88
86
|
});
|
|
89
|
-
if (res.ok) {
|
|
90
|
-
return res;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
87
|
+
if (!res.ok) {
|
|
93
88
|
throw new errors_1.ErrorWithResponse(res);
|
|
94
89
|
}
|
|
90
|
+
return res;
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
93
|
exports.BasicAPI = BasicAPI;
|
|
@@ -22301,18 +22301,59 @@ export declare const streamStatsSchema: z.ZodObject<{
|
|
|
22301
22301
|
stream_bytes_time_ms: z.ZodNumber;
|
|
22302
22302
|
stream_bytes: z.ZodNumber;
|
|
22303
22303
|
start_count: z.ZodNumber;
|
|
22304
|
-
is_streaming: z.
|
|
22304
|
+
is_streaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
22305
22305
|
}, "strip", z.ZodTypeAny, {
|
|
22306
22306
|
net_stats: string;
|
|
22307
22307
|
stream_bytes_time_ms: number;
|
|
22308
22308
|
stream_bytes: number;
|
|
22309
22309
|
start_count: number;
|
|
22310
|
-
is_streaming:
|
|
22310
|
+
is_streaming: 0 | 1;
|
|
22311
22311
|
}, {
|
|
22312
22312
|
net_stats: string;
|
|
22313
22313
|
stream_bytes_time_ms: number;
|
|
22314
22314
|
stream_bytes: number;
|
|
22315
22315
|
start_count: number;
|
|
22316
|
-
is_streaming:
|
|
22316
|
+
is_streaming: 0 | 1;
|
|
22317
22317
|
}>;
|
|
22318
22318
|
export type TStreamStats = z.infer<typeof streamStatsSchema>;
|
|
22319
|
+
export declare const srtStreamStatisticsSchema: z.ZodObject<{
|
|
22320
|
+
msTimeStamp: z.ZodNumber;
|
|
22321
|
+
pktSentTotal: z.ZodNumber;
|
|
22322
|
+
byteSentTotal: z.ZodNumber;
|
|
22323
|
+
pktRetransTotal: z.ZodNumber;
|
|
22324
|
+
byteRetransTotal: z.ZodNumber;
|
|
22325
|
+
pktSndDropTotal: z.ZodNumber;
|
|
22326
|
+
byteSndDropTotal: z.ZodNumber;
|
|
22327
|
+
mbpsSendRate: z.ZodNumber;
|
|
22328
|
+
mbpsBandwidth: z.ZodNumber;
|
|
22329
|
+
mbpsMaxBW: z.ZodNumber;
|
|
22330
|
+
msRTT: z.ZodNumber;
|
|
22331
|
+
msSndBuf: z.ZodNumber;
|
|
22332
|
+
}, "strip", z.ZodTypeAny, {
|
|
22333
|
+
msTimeStamp: number;
|
|
22334
|
+
pktSentTotal: number;
|
|
22335
|
+
byteSentTotal: number;
|
|
22336
|
+
pktRetransTotal: number;
|
|
22337
|
+
byteRetransTotal: number;
|
|
22338
|
+
pktSndDropTotal: number;
|
|
22339
|
+
byteSndDropTotal: number;
|
|
22340
|
+
mbpsSendRate: number;
|
|
22341
|
+
mbpsBandwidth: number;
|
|
22342
|
+
mbpsMaxBW: number;
|
|
22343
|
+
msRTT: number;
|
|
22344
|
+
msSndBuf: number;
|
|
22345
|
+
}, {
|
|
22346
|
+
msTimeStamp: number;
|
|
22347
|
+
pktSentTotal: number;
|
|
22348
|
+
byteSentTotal: number;
|
|
22349
|
+
pktRetransTotal: number;
|
|
22350
|
+
byteRetransTotal: number;
|
|
22351
|
+
pktSndDropTotal: number;
|
|
22352
|
+
byteSndDropTotal: number;
|
|
22353
|
+
mbpsSendRate: number;
|
|
22354
|
+
mbpsBandwidth: number;
|
|
22355
|
+
mbpsMaxBW: number;
|
|
22356
|
+
msRTT: number;
|
|
22357
|
+
msSndBuf: number;
|
|
22358
|
+
}>;
|
|
22359
|
+
export type TSrtStreamStatistics = z.infer<typeof srtStreamStatisticsSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.streamStatsSchema = exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isYoutubeRtmpStream = exports.isGameChangerStream = exports.isMicrosoftStream = exports.isMicrosoftAzureStream = exports.isIbmStream = exports.isDailymotionStream = exports.isWowzaStream = exports.isHlsPushStream = exports.isHlsPullStream = exports.isDaCastStream = exports.isSrtStream = exports.isChurchStream = exports.isTwitchStream = exports.isVimeoStream = exports.isYouTubeStream = exports.isWindyStream = exports.isSdCardStream = exports.isRtmpStream = exports.isMpegDvbStream = exports.isFacebookStream = exports.streamListSchema = exports.streamSchema = void 0;
|
|
3
|
+
exports.srtStreamStatisticsSchema = exports.streamStatsSchema = exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isYoutubeRtmpStream = exports.isGameChangerStream = exports.isMicrosoftStream = exports.isMicrosoftAzureStream = exports.isIbmStream = exports.isDailymotionStream = exports.isWowzaStream = exports.isHlsPushStream = exports.isHlsPullStream = exports.isDaCastStream = exports.isSrtStream = exports.isChurchStream = exports.isTwitchStream = exports.isVimeoStream = exports.isYouTubeStream = exports.isWindyStream = exports.isSdCardStream = exports.isRtmpStream = exports.isMpegDvbStream = exports.isFacebookStream = exports.streamListSchema = exports.streamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const facebookSchema_1 = require("./facebookSchema");
|
|
6
6
|
const windySchema_1 = require("./windySchema");
|
|
@@ -144,8 +144,22 @@ exports.audioLocalSchema = zod_1.z.object({
|
|
|
144
144
|
});
|
|
145
145
|
exports.streamStatsSchema = zod_1.z.object({
|
|
146
146
|
net_stats: zod_1.z.string(),
|
|
147
|
-
stream_bytes_time_ms: zod_1.z.number(),
|
|
148
|
-
stream_bytes: zod_1.z.number(),
|
|
149
|
-
start_count: zod_1.z.number(),
|
|
150
|
-
is_streaming: zod_1.z.
|
|
147
|
+
stream_bytes_time_ms: zod_1.z.number().nonnegative(),
|
|
148
|
+
stream_bytes: zod_1.z.number().nonnegative(),
|
|
149
|
+
start_count: zod_1.z.number().nonnegative(),
|
|
150
|
+
is_streaming: zod_1.z.literal(0).or(zod_1.z.literal(1)),
|
|
151
|
+
});
|
|
152
|
+
exports.srtStreamStatisticsSchema = zod_1.z.object({
|
|
153
|
+
msTimeStamp: zod_1.z.number().nonnegative(),
|
|
154
|
+
pktSentTotal: zod_1.z.number().nonnegative(),
|
|
155
|
+
byteSentTotal: zod_1.z.number().nonnegative(),
|
|
156
|
+
pktRetransTotal: zod_1.z.number().nonnegative(),
|
|
157
|
+
byteRetransTotal: zod_1.z.number().nonnegative(),
|
|
158
|
+
pktSndDropTotal: zod_1.z.number().nonnegative(),
|
|
159
|
+
byteSndDropTotal: zod_1.z.number().nonnegative(),
|
|
160
|
+
mbpsSendRate: zod_1.z.number().nonnegative(),
|
|
161
|
+
mbpsBandwidth: zod_1.z.number().nonnegative(),
|
|
162
|
+
mbpsMaxBW: zod_1.z.number().nonnegative(),
|
|
163
|
+
msRTT: zod_1.z.number().nonnegative(),
|
|
164
|
+
msSndBuf: zod_1.z.number().nonnegative(),
|
|
151
165
|
});
|
package/esm/CamStreamerAPI.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { audioFileListSchema, storageListSchema, streamSchema, streamStatsSchema, } from './types/CamStreamerAPI/CamStreamerAPI';
|
|
2
|
+
import { audioFileListSchema, srtStreamStatisticsSchema, storageListSchema, streamSchema, streamStatsSchema, } from './types/CamStreamerAPI/CamStreamerAPI';
|
|
3
3
|
import { UtcTimeFetchError, WsAuthorizationError, MigrationError } from './errors/errors';
|
|
4
4
|
import { oldStringStreamSchema, oldStringStreamSchemaWithId, } from './types/CamStreamerAPI/oldStreamSchema';
|
|
5
5
|
import { BasicAPI } from './internal/BasicAPI';
|
|
@@ -88,10 +88,14 @@ export class CamStreamerAPI extends BasicAPI {
|
|
|
88
88
|
stream_id: streamId,
|
|
89
89
|
}, options);
|
|
90
90
|
}
|
|
91
|
-
async
|
|
91
|
+
async getStreamNetworkStatistics(streamId, options) {
|
|
92
92
|
const res = await this._getJson(`${BASE_PATH}/get_streamstat.cgi`, { stream_id: streamId }, options);
|
|
93
93
|
return streamStatsSchema.parse(res.data);
|
|
94
94
|
}
|
|
95
|
+
async getSrtStreamStatistics(streamId, options) {
|
|
96
|
+
const res = await this._getJson(`${BASE_PATH}/srt_statistics.cgi`, { stream_id: streamId }, options);
|
|
97
|
+
return srtStreamStatisticsSchema.parse(res.data);
|
|
98
|
+
}
|
|
95
99
|
async setStreamEnabled(streamId, enabled, options) {
|
|
96
100
|
await this._postUrlEncoded(`${BASE_PATH}/set_stream_enabled.cgi`, { stream_id: streamId, enabled: enabled ? 1 : 0 }, options);
|
|
97
101
|
}
|
package/esm/VapixAPI.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { arrayToUrl, isNullish } from './internal/utils';
|
|
1
|
+
import { arrayToUrl, isNullish, paramToUrl } from './internal/utils';
|
|
2
2
|
import { sdCardWatchedStatuses, APP_IDS, maxFpsResponseSchema, dateTimeinfoSchema, audioDeviceRequestSchema, audioSampleRatesResponseSchema, timeZoneSchema, getPortsResponseSchema, guardTourSchema, ptzOverviewSchema, cameraPTZItemDataSchema, applicationListSchema, sdCardInfoSchema, } from './types/VapixAPI';
|
|
3
3
|
import { ApplicationAPIError, MaxFPSError, NoDeviceInfoError, PtzNotSupportedError, ErrorWithResponse, SDCardActionError, SDCardJobError, SettingParameterError, TimezoneFetchError, TimezoneNotSetupError, } from './errors/errors';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -10,6 +10,16 @@ export class VapixAPI extends BasicAPI {
|
|
|
10
10
|
super(client);
|
|
11
11
|
this.CustomFormData = CustomFormData;
|
|
12
12
|
}
|
|
13
|
+
async postUrlEncoded(path, parameters, headers, options) {
|
|
14
|
+
const data = paramToUrl(parameters);
|
|
15
|
+
const head = { ...headers, 'Content-Type': 'application/x-www-form-urlencoded' };
|
|
16
|
+
const agent = this.getClient(options?.proxyParams);
|
|
17
|
+
const res = await agent.post({ path, data, headers: head, timeout: options?.timeout });
|
|
18
|
+
if (!res.ok) {
|
|
19
|
+
throw new ErrorWithResponse(res);
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
13
23
|
postJson = async (path, data, headers, options) => {
|
|
14
24
|
const agent = this.getClient(options?.proxyParams);
|
|
15
25
|
const jsonData = JSON.stringify(data);
|
|
@@ -19,12 +29,10 @@ export class VapixAPI extends BasicAPI {
|
|
|
19
29
|
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
20
30
|
timeout: options?.timeout,
|
|
21
31
|
});
|
|
22
|
-
if (res.ok) {
|
|
23
|
-
return res;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
32
|
+
if (!res.ok) {
|
|
26
33
|
throw new ErrorWithResponse(res);
|
|
27
34
|
}
|
|
35
|
+
return res;
|
|
28
36
|
};
|
|
29
37
|
async getCameraImage(parameters, options) {
|
|
30
38
|
const agent = this.getClient(options?.proxyParams);
|
package/esm/internal/BasicAPI.js
CHANGED
|
@@ -67,12 +67,10 @@ export class BasicAPI {
|
|
|
67
67
|
headers: { 'Content-Type': 'application/json' },
|
|
68
68
|
timeout: options?.timeout,
|
|
69
69
|
});
|
|
70
|
-
if (res.ok) {
|
|
71
|
-
return res;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
70
|
+
if (!res.ok) {
|
|
74
71
|
throw new ErrorWithResponse(res);
|
|
75
72
|
}
|
|
73
|
+
return res;
|
|
76
74
|
}
|
|
77
75
|
async _postUrlEncoded(path, data, options) {
|
|
78
76
|
const encodedData = paramToUrl(data);
|
|
@@ -83,11 +81,9 @@ export class BasicAPI {
|
|
|
83
81
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
84
82
|
timeout: options?.timeout,
|
|
85
83
|
});
|
|
86
|
-
if (res.ok) {
|
|
87
|
-
return res;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
84
|
+
if (!res.ok) {
|
|
90
85
|
throw new ErrorWithResponse(res);
|
|
91
86
|
}
|
|
87
|
+
return res;
|
|
92
88
|
}
|
|
93
89
|
}
|
|
@@ -121,8 +121,22 @@ export const audioLocalSchema = z.object({
|
|
|
121
121
|
});
|
|
122
122
|
export const streamStatsSchema = z.object({
|
|
123
123
|
net_stats: z.string(),
|
|
124
|
-
stream_bytes_time_ms: z.number(),
|
|
125
|
-
stream_bytes: z.number(),
|
|
126
|
-
start_count: z.number(),
|
|
127
|
-
is_streaming: z.
|
|
124
|
+
stream_bytes_time_ms: z.number().nonnegative(),
|
|
125
|
+
stream_bytes: z.number().nonnegative(),
|
|
126
|
+
start_count: z.number().nonnegative(),
|
|
127
|
+
is_streaming: z.literal(0).or(z.literal(1)),
|
|
128
|
+
});
|
|
129
|
+
export const srtStreamStatisticsSchema = z.object({
|
|
130
|
+
msTimeStamp: z.number().nonnegative(),
|
|
131
|
+
pktSentTotal: z.number().nonnegative(),
|
|
132
|
+
byteSentTotal: z.number().nonnegative(),
|
|
133
|
+
pktRetransTotal: z.number().nonnegative(),
|
|
134
|
+
byteRetransTotal: z.number().nonnegative(),
|
|
135
|
+
pktSndDropTotal: z.number().nonnegative(),
|
|
136
|
+
byteSndDropTotal: z.number().nonnegative(),
|
|
137
|
+
mbpsSendRate: z.number().nonnegative(),
|
|
138
|
+
mbpsBandwidth: z.number().nonnegative(),
|
|
139
|
+
mbpsMaxBW: z.number().nonnegative(),
|
|
140
|
+
msRTT: z.number().nonnegative(),
|
|
141
|
+
msSndBuf: z.number().nonnegative(),
|
|
128
142
|
});
|
package/package.json
CHANGED
|
@@ -3110,12 +3110,26 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
3110
3110
|
streamIdentifier?: string | undefined;
|
|
3111
3111
|
}>;
|
|
3112
3112
|
setStream(streamId: string, streamData: TStream, options?: THttpRequestOptions): Promise<void>;
|
|
3113
|
-
|
|
3113
|
+
getStreamNetworkStatistics(streamId: string, options?: THttpRequestOptions): Promise<{
|
|
3114
3114
|
net_stats: string;
|
|
3115
3115
|
stream_bytes_time_ms: number;
|
|
3116
3116
|
stream_bytes: number;
|
|
3117
3117
|
start_count: number;
|
|
3118
|
-
is_streaming:
|
|
3118
|
+
is_streaming: 0 | 1;
|
|
3119
|
+
}>;
|
|
3120
|
+
getSrtStreamStatistics(streamId: string, options?: THttpRequestOptions): Promise<{
|
|
3121
|
+
msTimeStamp: number;
|
|
3122
|
+
pktSentTotal: number;
|
|
3123
|
+
byteSentTotal: number;
|
|
3124
|
+
pktRetransTotal: number;
|
|
3125
|
+
byteRetransTotal: number;
|
|
3126
|
+
pktSndDropTotal: number;
|
|
3127
|
+
byteSndDropTotal: number;
|
|
3128
|
+
mbpsSendRate: number;
|
|
3129
|
+
mbpsBandwidth: number;
|
|
3130
|
+
mbpsMaxBW: number;
|
|
3131
|
+
msRTT: number;
|
|
3132
|
+
msSndBuf: number;
|
|
3119
3133
|
}>;
|
|
3120
3134
|
setStreamEnabled(streamId: string, enabled: boolean, options?: THttpRequestOptions): Promise<void>;
|
|
3121
3135
|
setStreamActive(streamId: string, active: boolean, options?: THttpRequestOptions): Promise<void>;
|
package/types/VapixAPI.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IClient, TResponse } from './internal/types';
|
|
1
|
+
import { IClient, TParameters, TResponse } from './internal/types';
|
|
2
2
|
import { TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
|
|
3
3
|
import { TCameraImageConfig, THttpRequestOptions } from './types/common';
|
|
4
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
@@ -8,6 +8,7 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
8
8
|
new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
|
|
9
9
|
prototype: FormData;
|
|
10
10
|
});
|
|
11
|
+
postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
11
12
|
postJson: (path: string, data: Record<string, any>, headers?: Record<string, string>, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
12
13
|
getCameraImage(parameters: TCameraImageConfig, options?: THttpRequestOptions): Promise<ReturnType<Client["get"]>>;
|
|
13
14
|
getEventDeclarations(options?: THttpRequestOptions): Promise<string>;
|
|
@@ -22301,18 +22301,59 @@ export declare const streamStatsSchema: z.ZodObject<{
|
|
|
22301
22301
|
stream_bytes_time_ms: z.ZodNumber;
|
|
22302
22302
|
stream_bytes: z.ZodNumber;
|
|
22303
22303
|
start_count: z.ZodNumber;
|
|
22304
|
-
is_streaming: z.
|
|
22304
|
+
is_streaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
22305
22305
|
}, "strip", z.ZodTypeAny, {
|
|
22306
22306
|
net_stats: string;
|
|
22307
22307
|
stream_bytes_time_ms: number;
|
|
22308
22308
|
stream_bytes: number;
|
|
22309
22309
|
start_count: number;
|
|
22310
|
-
is_streaming:
|
|
22310
|
+
is_streaming: 0 | 1;
|
|
22311
22311
|
}, {
|
|
22312
22312
|
net_stats: string;
|
|
22313
22313
|
stream_bytes_time_ms: number;
|
|
22314
22314
|
stream_bytes: number;
|
|
22315
22315
|
start_count: number;
|
|
22316
|
-
is_streaming:
|
|
22316
|
+
is_streaming: 0 | 1;
|
|
22317
22317
|
}>;
|
|
22318
22318
|
export type TStreamStats = z.infer<typeof streamStatsSchema>;
|
|
22319
|
+
export declare const srtStreamStatisticsSchema: z.ZodObject<{
|
|
22320
|
+
msTimeStamp: z.ZodNumber;
|
|
22321
|
+
pktSentTotal: z.ZodNumber;
|
|
22322
|
+
byteSentTotal: z.ZodNumber;
|
|
22323
|
+
pktRetransTotal: z.ZodNumber;
|
|
22324
|
+
byteRetransTotal: z.ZodNumber;
|
|
22325
|
+
pktSndDropTotal: z.ZodNumber;
|
|
22326
|
+
byteSndDropTotal: z.ZodNumber;
|
|
22327
|
+
mbpsSendRate: z.ZodNumber;
|
|
22328
|
+
mbpsBandwidth: z.ZodNumber;
|
|
22329
|
+
mbpsMaxBW: z.ZodNumber;
|
|
22330
|
+
msRTT: z.ZodNumber;
|
|
22331
|
+
msSndBuf: z.ZodNumber;
|
|
22332
|
+
}, "strip", z.ZodTypeAny, {
|
|
22333
|
+
msTimeStamp: number;
|
|
22334
|
+
pktSentTotal: number;
|
|
22335
|
+
byteSentTotal: number;
|
|
22336
|
+
pktRetransTotal: number;
|
|
22337
|
+
byteRetransTotal: number;
|
|
22338
|
+
pktSndDropTotal: number;
|
|
22339
|
+
byteSndDropTotal: number;
|
|
22340
|
+
mbpsSendRate: number;
|
|
22341
|
+
mbpsBandwidth: number;
|
|
22342
|
+
mbpsMaxBW: number;
|
|
22343
|
+
msRTT: number;
|
|
22344
|
+
msSndBuf: number;
|
|
22345
|
+
}, {
|
|
22346
|
+
msTimeStamp: number;
|
|
22347
|
+
pktSentTotal: number;
|
|
22348
|
+
byteSentTotal: number;
|
|
22349
|
+
pktRetransTotal: number;
|
|
22350
|
+
byteRetransTotal: number;
|
|
22351
|
+
pktSndDropTotal: number;
|
|
22352
|
+
byteSndDropTotal: number;
|
|
22353
|
+
mbpsSendRate: number;
|
|
22354
|
+
mbpsBandwidth: number;
|
|
22355
|
+
mbpsMaxBW: number;
|
|
22356
|
+
msRTT: number;
|
|
22357
|
+
msSndBuf: number;
|
|
22358
|
+
}>;
|
|
22359
|
+
export type TSrtStreamStatistics = z.infer<typeof srtStreamStatisticsSchema>;
|