camstreamerlib 4.0.0-beta.110 → 4.0.0-beta.112
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 +119 -0
- package/cjs/CamStreamerAPI.js +5 -1
- package/cjs/PlaneTrackerAPI.d.ts +6 -6
- package/cjs/VapixAPI.d.ts +3 -0
- package/cjs/VapixAPI.js +23 -0
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +994 -203
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +7 -1
- package/cjs/types/CamStreamerAPI/index.d.ts +1 -0
- package/cjs/types/CamStreamerAPI/index.js +1 -0
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +0 -2
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +1 -22
- package/cjs/types/CamStreamerAPI/youtubeRtmpSchema.d.ts +307 -0
- package/cjs/types/CamStreamerAPI/youtubeRtmpSchema.js +11 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +28 -28
- package/esm/CamStreamerAPI.js +5 -1
- package/esm/VapixAPI.js +23 -0
- package/esm/types/CamStreamerAPI/CamStreamerAPI.js +5 -0
- package/esm/types/CamStreamerAPI/index.js +1 -0
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +0 -21
- package/esm/types/CamStreamerAPI/youtubeRtmpSchema.js +5 -0
- package/package.json +1 -1
- package/types/CamStreamerAPI.d.ts +119 -0
- package/types/PlaneTrackerAPI.d.ts +6 -6
- package/types/VapixAPI.d.ts +3 -0
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +994 -203
- package/types/types/CamStreamerAPI/index.d.ts +1 -0
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +0 -2
- package/types/types/CamStreamerAPI/youtubeRtmpSchema.d.ts +307 -0
- package/types/types/PlaneTrackerAPI.d.ts +28 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = 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.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 mpegDvbSchema_1 = require("./mpegDvbSchema");
|
|
@@ -22,6 +22,7 @@ const microsoftAzureSchema_1 = require("./microsoftAzureSchema");
|
|
|
22
22
|
const microsoftStreamSchema_1 = require("./microsoftStreamSchema");
|
|
23
23
|
const gameChangerSchema_1 = require("./gameChangerSchema");
|
|
24
24
|
const common_1 = require("../common");
|
|
25
|
+
const youtubeRtmpSchema_1 = require("./youtubeRtmpSchema");
|
|
25
26
|
exports.streamSchema = zod_1.z.discriminatedUnion('type', [
|
|
26
27
|
facebookSchema_1.facebookSchema,
|
|
27
28
|
mpegDvbSchema_1.mpegDvbSchema,
|
|
@@ -42,6 +43,7 @@ exports.streamSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
42
43
|
microsoftAzureSchema_1.microsoftAzureSchema,
|
|
43
44
|
microsoftStreamSchema_1.microsoftStreamSchema,
|
|
44
45
|
gameChangerSchema_1.gameChangerSchema,
|
|
46
|
+
youtubeRtmpSchema_1.youtubeRtmpSchema,
|
|
45
47
|
]);
|
|
46
48
|
exports.streamListSchema = zod_1.z.object({ streamList: zod_1.z.array(exports.streamSchema) });
|
|
47
49
|
const isFacebookStream = (stream) => {
|
|
@@ -120,6 +122,10 @@ const isGameChangerStream = (stream) => {
|
|
|
120
122
|
return stream.type === 'game_changer';
|
|
121
123
|
};
|
|
122
124
|
exports.isGameChangerStream = isGameChangerStream;
|
|
125
|
+
const isYoutubeRtmpStream = (stream) => {
|
|
126
|
+
return stream.type === 'youtube_rtmp';
|
|
127
|
+
};
|
|
128
|
+
exports.isYoutubeRtmpStream = isYoutubeRtmpStream;
|
|
123
129
|
var AudioType;
|
|
124
130
|
(function (AudioType) {
|
|
125
131
|
AudioType[AudioType["MP3"] = 0] = "MP3";
|
|
@@ -23,3 +23,4 @@ __exportStar(require("./gameChangerSchema"), exports);
|
|
|
23
23
|
__exportStar(require("./sdCardSchema"), exports);
|
|
24
24
|
__exportStar(require("./windySchema"), exports);
|
|
25
25
|
__exportStar(require("./youtubeSchema"), exports);
|
|
26
|
+
__exportStar(require("./youtubeRtmpSchema"), exports);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const streamTypeSchema: z.ZodUnion<[z.ZodLiteral<"youtube">, z.ZodLiteral<"facebook">, z.ZodLiteral<"sd_card">, z.ZodLiteral<"windy">, z.ZodLiteral<"mpeg_dvb">, z.ZodLiteral<"rtmp">, z.ZodLiteral<"dailymotion">, z.ZodLiteral<"ibm">, z.ZodLiteral<"hls_pull">, z.ZodLiteral<"hls_push">, z.ZodLiteral<"wowza">, z.ZodLiteral<"microsoft_stream">, z.ZodLiteral<"microsoft_azure">, z.ZodLiteral<"vimeo">, z.ZodLiteral<"twitch">, z.ZodLiteral<"church">, z.ZodLiteral<"srt">, z.ZodLiteral<"da_cast">, z.ZodLiteral<"game_changer">]>;
|
|
3
|
-
export type TStreamType = z.infer<typeof streamTypeSchema>;
|
|
4
2
|
declare const scheduleSchema: z.ZodObject<{
|
|
5
3
|
start: z.ZodObject<{
|
|
6
4
|
day: z.ZodNumber;
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.streamCommonSchema = exports.streamAudioSchema = exports.streamVideoSchema = exports.internalVapixParametersSchema = exports.streamDelaySchema = exports.overlaysSchema = exports.videoCodecSchema = exports.streamingProtocolTypeSchema = exports.streamInputTypeSchema = exports.streamTriggerSchema =
|
|
3
|
+
exports.streamCommonSchema = exports.streamAudioSchema = exports.streamVideoSchema = exports.internalVapixParametersSchema = exports.streamDelaySchema = exports.overlaysSchema = exports.videoCodecSchema = exports.streamingProtocolTypeSchema = exports.streamInputTypeSchema = exports.streamTriggerSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_1 = require("../common");
|
|
6
|
-
exports.streamTypeSchema = zod_1.z.union([
|
|
7
|
-
zod_1.z.literal('youtube'),
|
|
8
|
-
zod_1.z.literal('facebook'),
|
|
9
|
-
zod_1.z.literal('sd_card'),
|
|
10
|
-
zod_1.z.literal('windy'),
|
|
11
|
-
zod_1.z.literal('mpeg_dvb'),
|
|
12
|
-
zod_1.z.literal('rtmp'),
|
|
13
|
-
zod_1.z.literal('dailymotion'),
|
|
14
|
-
zod_1.z.literal('ibm'),
|
|
15
|
-
zod_1.z.literal('hls_pull'),
|
|
16
|
-
zod_1.z.literal('hls_push'),
|
|
17
|
-
zod_1.z.literal('wowza'),
|
|
18
|
-
zod_1.z.literal('microsoft_stream'),
|
|
19
|
-
zod_1.z.literal('microsoft_azure'),
|
|
20
|
-
zod_1.z.literal('vimeo'),
|
|
21
|
-
zod_1.z.literal('twitch'),
|
|
22
|
-
zod_1.z.literal('church'),
|
|
23
|
-
zod_1.z.literal('srt'),
|
|
24
|
-
zod_1.z.literal('da_cast'),
|
|
25
|
-
zod_1.z.literal('game_changer'),
|
|
26
|
-
]);
|
|
27
6
|
const scheduleSchema = zod_1.z.object({
|
|
28
7
|
start: zod_1.z.object({
|
|
29
8
|
day: zod_1.z.number().int().min(0).max(6),
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const youtubeRtmpSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
enabled: z.ZodBoolean;
|
|
5
|
+
active: z.ZodBoolean;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"manual">;
|
|
9
|
+
ioPort: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: "manual";
|
|
12
|
+
ioPort: string | null;
|
|
13
|
+
}, {
|
|
14
|
+
type: "manual";
|
|
15
|
+
ioPort: string | null;
|
|
16
|
+
}>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"onetime">;
|
|
18
|
+
startTime: z.ZodNumber;
|
|
19
|
+
stopTime: z.ZodNumber;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "onetime";
|
|
22
|
+
startTime: number;
|
|
23
|
+
stopTime: number;
|
|
24
|
+
}, {
|
|
25
|
+
type: "onetime";
|
|
26
|
+
startTime: number;
|
|
27
|
+
stopTime: number;
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"recurrent">;
|
|
30
|
+
schedule: z.ZodArray<z.ZodObject<{
|
|
31
|
+
start: z.ZodObject<{
|
|
32
|
+
day: z.ZodNumber;
|
|
33
|
+
timeS: z.ZodNumber;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
day: number;
|
|
36
|
+
timeS: number;
|
|
37
|
+
}, {
|
|
38
|
+
day: number;
|
|
39
|
+
timeS: number;
|
|
40
|
+
}>;
|
|
41
|
+
stop: z.ZodObject<{
|
|
42
|
+
day: z.ZodNumber;
|
|
43
|
+
timeS: z.ZodNumber;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
day: number;
|
|
46
|
+
timeS: number;
|
|
47
|
+
}, {
|
|
48
|
+
day: number;
|
|
49
|
+
timeS: number;
|
|
50
|
+
}>;
|
|
51
|
+
isActive: z.ZodBoolean;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
start: {
|
|
54
|
+
day: number;
|
|
55
|
+
timeS: number;
|
|
56
|
+
};
|
|
57
|
+
stop: {
|
|
58
|
+
day: number;
|
|
59
|
+
timeS: number;
|
|
60
|
+
};
|
|
61
|
+
isActive: boolean;
|
|
62
|
+
}, {
|
|
63
|
+
start: {
|
|
64
|
+
day: number;
|
|
65
|
+
timeS: number;
|
|
66
|
+
};
|
|
67
|
+
stop: {
|
|
68
|
+
day: number;
|
|
69
|
+
timeS: number;
|
|
70
|
+
};
|
|
71
|
+
isActive: boolean;
|
|
72
|
+
}>, "many">;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
type: "recurrent";
|
|
75
|
+
schedule: {
|
|
76
|
+
start: {
|
|
77
|
+
day: number;
|
|
78
|
+
timeS: number;
|
|
79
|
+
};
|
|
80
|
+
stop: {
|
|
81
|
+
day: number;
|
|
82
|
+
timeS: number;
|
|
83
|
+
};
|
|
84
|
+
isActive: boolean;
|
|
85
|
+
}[];
|
|
86
|
+
}, {
|
|
87
|
+
type: "recurrent";
|
|
88
|
+
schedule: {
|
|
89
|
+
start: {
|
|
90
|
+
day: number;
|
|
91
|
+
timeS: number;
|
|
92
|
+
};
|
|
93
|
+
stop: {
|
|
94
|
+
day: number;
|
|
95
|
+
timeS: number;
|
|
96
|
+
};
|
|
97
|
+
isActive: boolean;
|
|
98
|
+
}[];
|
|
99
|
+
}>]>;
|
|
100
|
+
video: z.ZodObject<{
|
|
101
|
+
inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
|
|
102
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
103
|
+
internalVapixParameters: z.ZodString;
|
|
104
|
+
userVapixParameters: z.ZodString;
|
|
105
|
+
streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
|
|
106
|
+
streamDelay: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
value: z.ZodNumber;
|
|
108
|
+
unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
value: number;
|
|
111
|
+
unit: "seconds" | "minutes" | "hours";
|
|
112
|
+
}, {
|
|
113
|
+
value: number;
|
|
114
|
+
unit: "seconds" | "minutes" | "hours";
|
|
115
|
+
}>>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
118
|
+
internalVapixParameters: string;
|
|
119
|
+
userVapixParameters: string;
|
|
120
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
121
|
+
sourceUrl?: string | undefined;
|
|
122
|
+
streamDelay?: {
|
|
123
|
+
value: number;
|
|
124
|
+
unit: "seconds" | "minutes" | "hours";
|
|
125
|
+
} | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
128
|
+
internalVapixParameters: string;
|
|
129
|
+
userVapixParameters: string;
|
|
130
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
131
|
+
sourceUrl?: string | undefined;
|
|
132
|
+
streamDelay?: {
|
|
133
|
+
value: number;
|
|
134
|
+
unit: "seconds" | "minutes" | "hours";
|
|
135
|
+
} | undefined;
|
|
136
|
+
}>;
|
|
137
|
+
audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
|
|
138
|
+
source: z.ZodLiteral<"none">;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
source: "none";
|
|
141
|
+
}, {
|
|
142
|
+
source: "none";
|
|
143
|
+
}>, z.ZodObject<{
|
|
144
|
+
source: z.ZodLiteral<"microphone">;
|
|
145
|
+
audioChannelNbr: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
source: "microphone";
|
|
148
|
+
audioChannelNbr: 1 | 2;
|
|
149
|
+
}, {
|
|
150
|
+
source: "microphone";
|
|
151
|
+
audioChannelNbr: 1 | 2;
|
|
152
|
+
}>, z.ZodObject<{
|
|
153
|
+
source: z.ZodLiteral<"file">;
|
|
154
|
+
fileName: z.ZodString;
|
|
155
|
+
filePath: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
source: "file";
|
|
158
|
+
fileName: string;
|
|
159
|
+
filePath: string;
|
|
160
|
+
}, {
|
|
161
|
+
source: "file";
|
|
162
|
+
fileName: string;
|
|
163
|
+
filePath: string;
|
|
164
|
+
}>, z.ZodObject<{
|
|
165
|
+
source: z.ZodLiteral<"url">;
|
|
166
|
+
fileName: z.ZodString;
|
|
167
|
+
fileUrl: z.ZodString;
|
|
168
|
+
avSyncMsec: z.ZodNumber;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
source: "url";
|
|
171
|
+
fileName: string;
|
|
172
|
+
fileUrl: string;
|
|
173
|
+
avSyncMsec: number;
|
|
174
|
+
}, {
|
|
175
|
+
source: "url";
|
|
176
|
+
fileName: string;
|
|
177
|
+
fileUrl: string;
|
|
178
|
+
avSyncMsec: number;
|
|
179
|
+
}>]>;
|
|
180
|
+
} & {
|
|
181
|
+
outputUrl: z.ZodString;
|
|
182
|
+
streamKey: z.ZodString;
|
|
183
|
+
streamIdentifier: z.ZodOptional<z.ZodString>;
|
|
184
|
+
saveToSdCard: z.ZodBoolean;
|
|
185
|
+
statusCameraLed: z.ZodBoolean;
|
|
186
|
+
statusCameraOutput: z.ZodNullable<z.ZodString>;
|
|
187
|
+
} & {
|
|
188
|
+
type: z.ZodLiteral<"youtube_rtmp">;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
type: "youtube_rtmp";
|
|
191
|
+
audio: {
|
|
192
|
+
source: "none";
|
|
193
|
+
} | {
|
|
194
|
+
source: "microphone";
|
|
195
|
+
audioChannelNbr: 1 | 2;
|
|
196
|
+
} | {
|
|
197
|
+
source: "file";
|
|
198
|
+
fileName: string;
|
|
199
|
+
filePath: string;
|
|
200
|
+
} | {
|
|
201
|
+
source: "url";
|
|
202
|
+
fileName: string;
|
|
203
|
+
fileUrl: string;
|
|
204
|
+
avSyncMsec: number;
|
|
205
|
+
};
|
|
206
|
+
video: {
|
|
207
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
208
|
+
internalVapixParameters: string;
|
|
209
|
+
userVapixParameters: string;
|
|
210
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
211
|
+
sourceUrl?: string | undefined;
|
|
212
|
+
streamDelay?: {
|
|
213
|
+
value: number;
|
|
214
|
+
unit: "seconds" | "minutes" | "hours";
|
|
215
|
+
} | undefined;
|
|
216
|
+
};
|
|
217
|
+
enabled: boolean;
|
|
218
|
+
id: number;
|
|
219
|
+
active: boolean;
|
|
220
|
+
title: string;
|
|
221
|
+
trigger: {
|
|
222
|
+
type: "manual";
|
|
223
|
+
ioPort: string | null;
|
|
224
|
+
} | {
|
|
225
|
+
type: "onetime";
|
|
226
|
+
startTime: number;
|
|
227
|
+
stopTime: number;
|
|
228
|
+
} | {
|
|
229
|
+
type: "recurrent";
|
|
230
|
+
schedule: {
|
|
231
|
+
start: {
|
|
232
|
+
day: number;
|
|
233
|
+
timeS: number;
|
|
234
|
+
};
|
|
235
|
+
stop: {
|
|
236
|
+
day: number;
|
|
237
|
+
timeS: number;
|
|
238
|
+
};
|
|
239
|
+
isActive: boolean;
|
|
240
|
+
}[];
|
|
241
|
+
};
|
|
242
|
+
saveToSdCard: boolean;
|
|
243
|
+
statusCameraLed: boolean;
|
|
244
|
+
statusCameraOutput: string | null;
|
|
245
|
+
outputUrl: string;
|
|
246
|
+
streamKey: string;
|
|
247
|
+
streamIdentifier?: string | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
type: "youtube_rtmp";
|
|
250
|
+
audio: {
|
|
251
|
+
source: "none";
|
|
252
|
+
} | {
|
|
253
|
+
source: "microphone";
|
|
254
|
+
audioChannelNbr: 1 | 2;
|
|
255
|
+
} | {
|
|
256
|
+
source: "file";
|
|
257
|
+
fileName: string;
|
|
258
|
+
filePath: string;
|
|
259
|
+
} | {
|
|
260
|
+
source: "url";
|
|
261
|
+
fileName: string;
|
|
262
|
+
fileUrl: string;
|
|
263
|
+
avSyncMsec: number;
|
|
264
|
+
};
|
|
265
|
+
video: {
|
|
266
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
267
|
+
internalVapixParameters: string;
|
|
268
|
+
userVapixParameters: string;
|
|
269
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
270
|
+
sourceUrl?: string | undefined;
|
|
271
|
+
streamDelay?: {
|
|
272
|
+
value: number;
|
|
273
|
+
unit: "seconds" | "minutes" | "hours";
|
|
274
|
+
} | undefined;
|
|
275
|
+
};
|
|
276
|
+
enabled: boolean;
|
|
277
|
+
id: number;
|
|
278
|
+
active: boolean;
|
|
279
|
+
title: string;
|
|
280
|
+
trigger: {
|
|
281
|
+
type: "manual";
|
|
282
|
+
ioPort: string | null;
|
|
283
|
+
} | {
|
|
284
|
+
type: "onetime";
|
|
285
|
+
startTime: number;
|
|
286
|
+
stopTime: number;
|
|
287
|
+
} | {
|
|
288
|
+
type: "recurrent";
|
|
289
|
+
schedule: {
|
|
290
|
+
start: {
|
|
291
|
+
day: number;
|
|
292
|
+
timeS: number;
|
|
293
|
+
};
|
|
294
|
+
stop: {
|
|
295
|
+
day: number;
|
|
296
|
+
timeS: number;
|
|
297
|
+
};
|
|
298
|
+
isActive: boolean;
|
|
299
|
+
}[];
|
|
300
|
+
};
|
|
301
|
+
saveToSdCard: boolean;
|
|
302
|
+
statusCameraLed: boolean;
|
|
303
|
+
statusCameraOutput: string | null;
|
|
304
|
+
outputUrl: string;
|
|
305
|
+
streamKey: string;
|
|
306
|
+
streamIdentifier?: string | undefined;
|
|
307
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.youtubeRtmpSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const rtmpSchema_1 = require("./rtmpSchema");
|
|
9
|
+
exports.youtubeRtmpSchema = rtmpSchema_1.commonRtmpSchema.extend({
|
|
10
|
+
type: zod_1.default.literal('youtube_rtmp'),
|
|
11
|
+
});
|
|
@@ -28,15 +28,15 @@ export declare const connectionSchema: z.ZodObject<{
|
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
ip: string;
|
|
30
30
|
port: number;
|
|
31
|
-
protocol: "https" | "http" | "https_insecure";
|
|
32
|
-
user: string;
|
|
33
31
|
pass: string;
|
|
32
|
+
user: string;
|
|
33
|
+
protocol: "https" | "http" | "https_insecure";
|
|
34
34
|
}, {
|
|
35
35
|
ip: string;
|
|
36
36
|
port: number;
|
|
37
|
-
protocol: "https" | "http" | "https_insecure";
|
|
38
|
-
user: string;
|
|
39
37
|
pass: string;
|
|
38
|
+
user: string;
|
|
39
|
+
protocol: "https" | "http" | "https_insecure";
|
|
40
40
|
}>;
|
|
41
41
|
export declare const widgetSchema: z.ZodObject<{
|
|
42
42
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -80,15 +80,15 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
81
|
ip: string;
|
|
82
82
|
port: number;
|
|
83
|
-
protocol: "https" | "http" | "https_insecure";
|
|
84
|
-
user: string;
|
|
85
83
|
pass: string;
|
|
84
|
+
user: string;
|
|
85
|
+
protocol: "https" | "http" | "https_insecure";
|
|
86
86
|
}, {
|
|
87
87
|
ip: string;
|
|
88
88
|
port: number;
|
|
89
|
-
protocol: "https" | "http" | "https_insecure";
|
|
90
|
-
user: string;
|
|
91
89
|
pass: string;
|
|
90
|
+
user: string;
|
|
91
|
+
protocol: "https" | "http" | "https_insecure";
|
|
92
92
|
}>>;
|
|
93
93
|
cameraCalibrationProcessConfig: z.ZodDefault<z.ZodObject<{
|
|
94
94
|
nightSkyCalibrationEnabled: z.ZodBoolean;
|
|
@@ -334,17 +334,17 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
334
334
|
ip: string;
|
|
335
335
|
port: number;
|
|
336
336
|
enabled: boolean;
|
|
337
|
-
protocol: "https" | "http" | "https_insecure";
|
|
338
|
-
user: string;
|
|
339
337
|
pass: string;
|
|
338
|
+
user: string;
|
|
339
|
+
protocol: "https" | "http" | "https_insecure";
|
|
340
340
|
sourceKey: string;
|
|
341
341
|
}, {
|
|
342
342
|
ip: string;
|
|
343
343
|
port: number;
|
|
344
344
|
enabled: boolean;
|
|
345
|
-
protocol: "https" | "http" | "https_insecure";
|
|
346
|
-
user: string;
|
|
347
345
|
pass: string;
|
|
346
|
+
user: string;
|
|
347
|
+
protocol: "https" | "http" | "https_insecure";
|
|
348
348
|
sourceKey: string;
|
|
349
349
|
}>>;
|
|
350
350
|
genetec: z.ZodDefault<z.ZodObject<{
|
|
@@ -363,18 +363,18 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
363
363
|
port: number;
|
|
364
364
|
enabled: boolean;
|
|
365
365
|
cameraList: string[];
|
|
366
|
+
pass: string;
|
|
366
367
|
appId: string;
|
|
367
|
-
protocol: "https" | "http" | "https_insecure";
|
|
368
368
|
user: string;
|
|
369
|
-
|
|
369
|
+
protocol: "https" | "http" | "https_insecure";
|
|
370
370
|
baseUri: string;
|
|
371
371
|
}, {
|
|
372
372
|
ip: string;
|
|
373
373
|
port: number;
|
|
374
374
|
enabled: boolean;
|
|
375
|
-
protocol: "https" | "http" | "https_insecure";
|
|
376
|
-
user: string;
|
|
377
375
|
pass: string;
|
|
376
|
+
user: string;
|
|
377
|
+
protocol: "https" | "http" | "https_insecure";
|
|
378
378
|
cameraList?: string[] | undefined;
|
|
379
379
|
appId?: string | undefined;
|
|
380
380
|
baseUri?: string | undefined;
|
|
@@ -399,9 +399,9 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
399
399
|
camera: {
|
|
400
400
|
ip: string;
|
|
401
401
|
port: number;
|
|
402
|
-
protocol: "https" | "http" | "https_insecure";
|
|
403
|
-
user: string;
|
|
404
402
|
pass: string;
|
|
403
|
+
user: string;
|
|
404
|
+
protocol: "https" | "http" | "https_insecure";
|
|
405
405
|
};
|
|
406
406
|
units: "metric" | "imperial";
|
|
407
407
|
adsbSource: {
|
|
@@ -476,9 +476,9 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
476
476
|
ip: string;
|
|
477
477
|
port: number;
|
|
478
478
|
enabled: boolean;
|
|
479
|
-
protocol: "https" | "http" | "https_insecure";
|
|
480
|
-
user: string;
|
|
481
479
|
pass: string;
|
|
480
|
+
user: string;
|
|
481
|
+
protocol: "https" | "http" | "https_insecure";
|
|
482
482
|
sourceKey: string;
|
|
483
483
|
};
|
|
484
484
|
genetec: {
|
|
@@ -486,10 +486,10 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
486
486
|
port: number;
|
|
487
487
|
enabled: boolean;
|
|
488
488
|
cameraList: string[];
|
|
489
|
+
pass: string;
|
|
489
490
|
appId: string;
|
|
490
|
-
protocol: "https" | "http" | "https_insecure";
|
|
491
491
|
user: string;
|
|
492
|
-
|
|
492
|
+
protocol: "https" | "http" | "https_insecure";
|
|
493
493
|
baseUri: string;
|
|
494
494
|
};
|
|
495
495
|
camstreamerIntegration: {
|
|
@@ -523,9 +523,9 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
523
523
|
camera?: {
|
|
524
524
|
ip: string;
|
|
525
525
|
port: number;
|
|
526
|
-
protocol: "https" | "http" | "https_insecure";
|
|
527
|
-
user: string;
|
|
528
526
|
pass: string;
|
|
527
|
+
user: string;
|
|
528
|
+
protocol: "https" | "http" | "https_insecure";
|
|
529
529
|
} | undefined;
|
|
530
530
|
units?: "metric" | "imperial" | undefined;
|
|
531
531
|
adsbSource?: {
|
|
@@ -621,18 +621,18 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
621
621
|
ip: string;
|
|
622
622
|
port: number;
|
|
623
623
|
enabled: boolean;
|
|
624
|
-
protocol: "https" | "http" | "https_insecure";
|
|
625
|
-
user: string;
|
|
626
624
|
pass: string;
|
|
625
|
+
user: string;
|
|
626
|
+
protocol: "https" | "http" | "https_insecure";
|
|
627
627
|
sourceKey: string;
|
|
628
628
|
} | undefined;
|
|
629
629
|
genetec?: {
|
|
630
630
|
ip: string;
|
|
631
631
|
port: number;
|
|
632
632
|
enabled: boolean;
|
|
633
|
-
protocol: "https" | "http" | "https_insecure";
|
|
634
|
-
user: string;
|
|
635
633
|
pass: string;
|
|
634
|
+
user: string;
|
|
635
|
+
protocol: "https" | "http" | "https_insecure";
|
|
636
636
|
cameraList?: string[] | undefined;
|
|
637
637
|
appId?: string | undefined;
|
|
638
638
|
baseUri?: string | undefined;
|
package/esm/CamStreamerAPI.js
CHANGED
|
@@ -35,6 +35,10 @@ export class CamStreamerAPI {
|
|
|
35
35
|
async getMaxFps(source = 0, options) {
|
|
36
36
|
return await this._getJson(`${BASE_PATH}/get_max_framerate.cgi`, { video_source: source.toString() }, options);
|
|
37
37
|
}
|
|
38
|
+
async isCSPassValid(pass, options) {
|
|
39
|
+
const res = await this._getJson(`${BASE_PATH}/check_pass.cgi`, { pass }, options);
|
|
40
|
+
return res.data === '1';
|
|
41
|
+
}
|
|
38
42
|
async getStreamList(options) {
|
|
39
43
|
const res = await this._getJson(`${BASE_PATH}/stream_list.cgi`, { action: 'get' }, options);
|
|
40
44
|
const oldStreamListRecord = z.record(z.string(), oldStringStreamSchema).safeParse(res.data);
|
|
@@ -64,7 +68,7 @@ export class CamStreamerAPI {
|
|
|
64
68
|
}
|
|
65
69
|
invalidStreamData.push(streamData);
|
|
66
70
|
}
|
|
67
|
-
if (oldStreamData.length > 0) {
|
|
71
|
+
if (oldStreamData.length > 0 || invalidStreamData.length > 0) {
|
|
68
72
|
throw new MigrationError(newStreamData, oldStreamData, invalidStreamData);
|
|
69
73
|
}
|
|
70
74
|
return newStreamData;
|
package/esm/VapixAPI.js
CHANGED
|
@@ -392,6 +392,29 @@ export class VapixAPI {
|
|
|
392
392
|
params: { port, sequence },
|
|
393
393
|
}, undefined, options);
|
|
394
394
|
}
|
|
395
|
+
async addCameraUser(username, pass, sgrp, comment, options) {
|
|
396
|
+
return await this.postUrlEncoded('/axis-cgi/pwdgrp.cgi', {
|
|
397
|
+
action: 'add',
|
|
398
|
+
user: username,
|
|
399
|
+
pwd: pass,
|
|
400
|
+
grp: 'users',
|
|
401
|
+
sgrp,
|
|
402
|
+
comment,
|
|
403
|
+
}, undefined, options);
|
|
404
|
+
}
|
|
405
|
+
async getCameraUsers(options) {
|
|
406
|
+
const res = await this.postUrlEncoded('/axis-cgi/pwdgrp.cgi', {
|
|
407
|
+
action: 'get',
|
|
408
|
+
}, undefined, options);
|
|
409
|
+
return await res.text();
|
|
410
|
+
}
|
|
411
|
+
async editCameraUser(username, pass, options) {
|
|
412
|
+
return await this.postUrlEncoded('/axis-cgi/pwdgrp.cgi', {
|
|
413
|
+
action: 'update',
|
|
414
|
+
user: username,
|
|
415
|
+
pwd: pass,
|
|
416
|
+
}, undefined, options);
|
|
417
|
+
}
|
|
395
418
|
async getApplicationList(options) {
|
|
396
419
|
const agent = this.getClient(options?.proxyParams);
|
|
397
420
|
const res = await agent.get({ path: '/axis-cgi/applications/list.cgi', timeout: options?.timeout });
|
|
@@ -19,6 +19,7 @@ import { microsoftAzureSchema } from './microsoftAzureSchema';
|
|
|
19
19
|
import { microsoftStreamSchema } from './microsoftStreamSchema';
|
|
20
20
|
import { gameChangerSchema } from './gameChangerSchema';
|
|
21
21
|
import { fileSchema } from '../common';
|
|
22
|
+
import { youtubeRtmpSchema } from './youtubeRtmpSchema';
|
|
22
23
|
export const streamSchema = z.discriminatedUnion('type', [
|
|
23
24
|
facebookSchema,
|
|
24
25
|
mpegDvbSchema,
|
|
@@ -39,6 +40,7 @@ export const streamSchema = z.discriminatedUnion('type', [
|
|
|
39
40
|
microsoftAzureSchema,
|
|
40
41
|
microsoftStreamSchema,
|
|
41
42
|
gameChangerSchema,
|
|
43
|
+
youtubeRtmpSchema,
|
|
42
44
|
]);
|
|
43
45
|
export const streamListSchema = z.object({ streamList: z.array(streamSchema) });
|
|
44
46
|
export const isFacebookStream = (stream) => {
|
|
@@ -98,6 +100,9 @@ export const isMicrosoftStream = (stream) => {
|
|
|
98
100
|
export const isGameChangerStream = (stream) => {
|
|
99
101
|
return stream.type === 'game_changer';
|
|
100
102
|
};
|
|
103
|
+
export const isYoutubeRtmpStream = (stream) => {
|
|
104
|
+
return stream.type === 'youtube_rtmp';
|
|
105
|
+
};
|
|
101
106
|
export var AudioType;
|
|
102
107
|
(function (AudioType) {
|
|
103
108
|
AudioType[AudioType["MP3"] = 0] = "MP3";
|
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { bitrateVapixParamsSchema, booleanSchema, h264ProfileSchema } from '../common';
|
|
3
|
-
export const streamTypeSchema = z.union([
|
|
4
|
-
z.literal('youtube'),
|
|
5
|
-
z.literal('facebook'),
|
|
6
|
-
z.literal('sd_card'),
|
|
7
|
-
z.literal('windy'),
|
|
8
|
-
z.literal('mpeg_dvb'),
|
|
9
|
-
z.literal('rtmp'),
|
|
10
|
-
z.literal('dailymotion'),
|
|
11
|
-
z.literal('ibm'),
|
|
12
|
-
z.literal('hls_pull'),
|
|
13
|
-
z.literal('hls_push'),
|
|
14
|
-
z.literal('wowza'),
|
|
15
|
-
z.literal('microsoft_stream'),
|
|
16
|
-
z.literal('microsoft_azure'),
|
|
17
|
-
z.literal('vimeo'),
|
|
18
|
-
z.literal('twitch'),
|
|
19
|
-
z.literal('church'),
|
|
20
|
-
z.literal('srt'),
|
|
21
|
-
z.literal('da_cast'),
|
|
22
|
-
z.literal('game_changer'),
|
|
23
|
-
]);
|
|
24
3
|
const scheduleSchema = z.object({
|
|
25
4
|
start: z.object({
|
|
26
5
|
day: z.number().int().min(0).max(6),
|