camstreamerlib 4.0.0-beta.110 → 4.0.0-beta.111
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 +118 -0
- package/cjs/CamStreamerAPI.js +1 -1
- 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/esm/CamStreamerAPI.js +1 -1
- 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 +118 -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
|
@@ -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
|
+
});
|
package/esm/CamStreamerAPI.js
CHANGED
|
@@ -64,7 +64,7 @@ export class CamStreamerAPI {
|
|
|
64
64
|
}
|
|
65
65
|
invalidStreamData.push(streamData);
|
|
66
66
|
}
|
|
67
|
-
if (oldStreamData.length > 0) {
|
|
67
|
+
if (oldStreamData.length > 0 || invalidStreamData.length > 0) {
|
|
68
68
|
throw new MigrationError(newStreamData, oldStreamData, invalidStreamData);
|
|
69
69
|
}
|
|
70
70
|
return newStreamData;
|
|
@@ -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),
|
package/package.json
CHANGED
|
@@ -1075,6 +1075,65 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
1075
1075
|
outputUrl: string;
|
|
1076
1076
|
streamKey: string;
|
|
1077
1077
|
streamIdentifier?: string | undefined;
|
|
1078
|
+
} | {
|
|
1079
|
+
type: "youtube_rtmp";
|
|
1080
|
+
audio: {
|
|
1081
|
+
source: "none";
|
|
1082
|
+
} | {
|
|
1083
|
+
source: "microphone";
|
|
1084
|
+
audioChannelNbr: 1 | 2;
|
|
1085
|
+
} | {
|
|
1086
|
+
source: "file";
|
|
1087
|
+
fileName: string;
|
|
1088
|
+
filePath: string;
|
|
1089
|
+
} | {
|
|
1090
|
+
source: "url";
|
|
1091
|
+
fileName: string;
|
|
1092
|
+
fileUrl: string;
|
|
1093
|
+
avSyncMsec: number;
|
|
1094
|
+
};
|
|
1095
|
+
video: {
|
|
1096
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
1097
|
+
internalVapixParameters: string;
|
|
1098
|
+
userVapixParameters: string;
|
|
1099
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
1100
|
+
sourceUrl?: string | undefined;
|
|
1101
|
+
streamDelay?: {
|
|
1102
|
+
value: number;
|
|
1103
|
+
unit: "seconds" | "minutes" | "hours";
|
|
1104
|
+
} | undefined;
|
|
1105
|
+
};
|
|
1106
|
+
enabled: boolean;
|
|
1107
|
+
id: number;
|
|
1108
|
+
active: boolean;
|
|
1109
|
+
title: string;
|
|
1110
|
+
trigger: {
|
|
1111
|
+
type: "manual";
|
|
1112
|
+
ioPort: string | null;
|
|
1113
|
+
} | {
|
|
1114
|
+
type: "onetime";
|
|
1115
|
+
startTime: number;
|
|
1116
|
+
stopTime: number;
|
|
1117
|
+
} | {
|
|
1118
|
+
type: "recurrent";
|
|
1119
|
+
schedule: {
|
|
1120
|
+
start: {
|
|
1121
|
+
day: number;
|
|
1122
|
+
timeS: number;
|
|
1123
|
+
};
|
|
1124
|
+
stop: {
|
|
1125
|
+
day: number;
|
|
1126
|
+
timeS: number;
|
|
1127
|
+
};
|
|
1128
|
+
isActive: boolean;
|
|
1129
|
+
}[];
|
|
1130
|
+
};
|
|
1131
|
+
saveToSdCard: boolean;
|
|
1132
|
+
statusCameraLed: boolean;
|
|
1133
|
+
statusCameraOutput: string | null;
|
|
1134
|
+
outputUrl: string;
|
|
1135
|
+
streamKey: string;
|
|
1136
|
+
streamIdentifier?: string | undefined;
|
|
1078
1137
|
})[]>;
|
|
1079
1138
|
setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
|
|
1080
1139
|
getStream(streamId: number, options?: THttpRequestOptions): Promise<{
|
|
@@ -2139,6 +2198,65 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
2139
2198
|
outputUrl: string;
|
|
2140
2199
|
streamKey: string;
|
|
2141
2200
|
streamIdentifier?: string | undefined;
|
|
2201
|
+
} | {
|
|
2202
|
+
type: "youtube_rtmp";
|
|
2203
|
+
audio: {
|
|
2204
|
+
source: "none";
|
|
2205
|
+
} | {
|
|
2206
|
+
source: "microphone";
|
|
2207
|
+
audioChannelNbr: 1 | 2;
|
|
2208
|
+
} | {
|
|
2209
|
+
source: "file";
|
|
2210
|
+
fileName: string;
|
|
2211
|
+
filePath: string;
|
|
2212
|
+
} | {
|
|
2213
|
+
source: "url";
|
|
2214
|
+
fileName: string;
|
|
2215
|
+
fileUrl: string;
|
|
2216
|
+
avSyncMsec: number;
|
|
2217
|
+
};
|
|
2218
|
+
video: {
|
|
2219
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
2220
|
+
internalVapixParameters: string;
|
|
2221
|
+
userVapixParameters: string;
|
|
2222
|
+
streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
|
|
2223
|
+
sourceUrl?: string | undefined;
|
|
2224
|
+
streamDelay?: {
|
|
2225
|
+
value: number;
|
|
2226
|
+
unit: "seconds" | "minutes" | "hours";
|
|
2227
|
+
} | undefined;
|
|
2228
|
+
};
|
|
2229
|
+
enabled: boolean;
|
|
2230
|
+
id: number;
|
|
2231
|
+
active: boolean;
|
|
2232
|
+
title: string;
|
|
2233
|
+
trigger: {
|
|
2234
|
+
type: "manual";
|
|
2235
|
+
ioPort: string | null;
|
|
2236
|
+
} | {
|
|
2237
|
+
type: "onetime";
|
|
2238
|
+
startTime: number;
|
|
2239
|
+
stopTime: number;
|
|
2240
|
+
} | {
|
|
2241
|
+
type: "recurrent";
|
|
2242
|
+
schedule: {
|
|
2243
|
+
start: {
|
|
2244
|
+
day: number;
|
|
2245
|
+
timeS: number;
|
|
2246
|
+
};
|
|
2247
|
+
stop: {
|
|
2248
|
+
day: number;
|
|
2249
|
+
timeS: number;
|
|
2250
|
+
};
|
|
2251
|
+
isActive: boolean;
|
|
2252
|
+
}[];
|
|
2253
|
+
};
|
|
2254
|
+
saveToSdCard: boolean;
|
|
2255
|
+
statusCameraLed: boolean;
|
|
2256
|
+
statusCameraOutput: string | null;
|
|
2257
|
+
outputUrl: string;
|
|
2258
|
+
streamKey: string;
|
|
2259
|
+
streamIdentifier?: string | undefined;
|
|
2142
2260
|
}>;
|
|
2143
2261
|
setStream(streamId: number, streamData: TStream, options?: THttpRequestOptions): Promise<void>;
|
|
2144
2262
|
isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|