camstreamerlib 4.0.0-beta.96 → 4.0.0-beta.97

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.
Files changed (81) hide show
  1. package/cjs/CamStreamerAPI.d.ts +1032 -214
  2. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +7465 -1780
  3. package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +79 -7
  4. package/cjs/types/CamStreamerAPI/{hlsSchema.d.ts → churchSchema.d.ts} +48 -75
  5. package/cjs/types/CamStreamerAPI/churchSchema.js +11 -0
  6. package/cjs/types/CamStreamerAPI/daCastSchema.d.ts +202 -0
  7. package/cjs/types/CamStreamerAPI/daCastSchema.js +11 -0
  8. package/cjs/types/CamStreamerAPI/dailymotionSchema.d.ts +202 -0
  9. package/cjs/types/CamStreamerAPI/dailymotionSchema.js +11 -0
  10. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +44 -71
  11. package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +202 -0
  12. package/cjs/types/CamStreamerAPI/gameChangerSchema.js +11 -0
  13. package/cjs/types/CamStreamerAPI/hlsPullSchema.d.ts +202 -0
  14. package/cjs/types/CamStreamerAPI/hlsPullSchema.js +11 -0
  15. package/cjs/types/CamStreamerAPI/hlsPushSchema.d.ts +202 -0
  16. package/cjs/types/CamStreamerAPI/hlsPushSchema.js +11 -0
  17. package/{types/types/CamStreamerAPI/hlsSchema.d.ts → cjs/types/CamStreamerAPI/ibmSchema.d.ts} +48 -75
  18. package/cjs/types/CamStreamerAPI/{hlsSchema.js → ibmSchema.js} +3 -3
  19. package/cjs/types/CamStreamerAPI/index.d.ts +0 -1
  20. package/cjs/types/CamStreamerAPI/index.js +0 -1
  21. package/cjs/types/CamStreamerAPI/microsoftAzureSchema.d.ts +202 -0
  22. package/cjs/types/CamStreamerAPI/microsoftAzureSchema.js +11 -0
  23. package/cjs/types/CamStreamerAPI/microsoftStreamSchema.d.ts +202 -0
  24. package/cjs/types/CamStreamerAPI/microsoftStreamSchema.js +11 -0
  25. package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +44 -71
  26. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  27. package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +44 -71
  28. package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +44 -71
  29. package/cjs/types/CamStreamerAPI/srtSchema.d.ts +202 -0
  30. package/cjs/types/CamStreamerAPI/srtSchema.js +11 -0
  31. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +71 -115
  32. package/cjs/types/CamStreamerAPI/streamCommonTypes.js +27 -20
  33. package/cjs/types/CamStreamerAPI/twitchSchema.d.ts +202 -0
  34. package/cjs/types/CamStreamerAPI/twitchSchema.js +11 -0
  35. package/cjs/types/CamStreamerAPI/vimeoSchema.d.ts +202 -0
  36. package/cjs/types/CamStreamerAPI/vimeoSchema.js +11 -0
  37. package/cjs/types/CamStreamerAPI/windySchema.d.ts +44 -71
  38. package/cjs/types/CamStreamerAPI/wowzaSchema.d.ts +202 -0
  39. package/cjs/types/CamStreamerAPI/wowzaSchema.js +11 -0
  40. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +44 -71
  41. package/esm/types/CamStreamerAPI/CamStreamerAPI.js +65 -5
  42. package/esm/types/CamStreamerAPI/churchSchema.js +5 -0
  43. package/esm/types/CamStreamerAPI/daCastSchema.js +5 -0
  44. package/esm/types/CamStreamerAPI/dailymotionSchema.js +5 -0
  45. package/esm/types/CamStreamerAPI/gameChangerSchema.js +5 -0
  46. package/esm/types/CamStreamerAPI/hlsPullSchema.js +5 -0
  47. package/esm/types/CamStreamerAPI/hlsPushSchema.js +5 -0
  48. package/esm/types/CamStreamerAPI/{hlsSchema.js → ibmSchema.js} +2 -2
  49. package/esm/types/CamStreamerAPI/index.js +0 -1
  50. package/esm/types/CamStreamerAPI/microsoftAzureSchema.js +5 -0
  51. package/esm/types/CamStreamerAPI/microsoftStreamSchema.js +5 -0
  52. package/esm/types/CamStreamerAPI/srtSchema.js +5 -0
  53. package/esm/types/CamStreamerAPI/streamCommonTypes.js +26 -19
  54. package/esm/types/CamStreamerAPI/twitchSchema.js +5 -0
  55. package/esm/types/CamStreamerAPI/vimeoSchema.js +5 -0
  56. package/esm/types/CamStreamerAPI/wowzaSchema.js +5 -0
  57. package/package.json +1 -1
  58. package/types/CamStreamerAPI.d.ts +1032 -214
  59. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +7465 -1780
  60. package/types/types/CamStreamerAPI/churchSchema.d.ts +202 -0
  61. package/types/types/CamStreamerAPI/daCastSchema.d.ts +202 -0
  62. package/types/types/CamStreamerAPI/dailymotionSchema.d.ts +202 -0
  63. package/types/types/CamStreamerAPI/facebookSchema.d.ts +44 -71
  64. package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +202 -0
  65. package/types/types/CamStreamerAPI/hlsPullSchema.d.ts +202 -0
  66. package/types/types/CamStreamerAPI/hlsPushSchema.d.ts +202 -0
  67. package/types/types/CamStreamerAPI/ibmSchema.d.ts +202 -0
  68. package/types/types/CamStreamerAPI/index.d.ts +0 -1
  69. package/types/types/CamStreamerAPI/microsoftAzureSchema.d.ts +202 -0
  70. package/types/types/CamStreamerAPI/microsoftStreamSchema.d.ts +202 -0
  71. package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +44 -71
  72. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  73. package/types/types/CamStreamerAPI/rtmpSchema.d.ts +44 -71
  74. package/types/types/CamStreamerAPI/sdCardSchema.d.ts +44 -71
  75. package/types/types/CamStreamerAPI/srtSchema.d.ts +202 -0
  76. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +71 -115
  77. package/types/types/CamStreamerAPI/twitchSchema.d.ts +202 -0
  78. package/types/types/CamStreamerAPI/vimeoSchema.d.ts +202 -0
  79. package/types/types/CamStreamerAPI/windySchema.d.ts +44 -71
  80. package/types/types/CamStreamerAPI/wowzaSchema.d.ts +202 -0
  81. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +44 -71
@@ -0,0 +1,202 @@
1
+ import z from 'zod';
2
+ export declare const wowzaSchema: 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
+ inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
+ internalVapixParameters: z.ZodObject<{
102
+ camera: z.ZodString;
103
+ resolution: z.ZodOptional<z.ZodString>;
104
+ compression: z.ZodOptional<z.ZodNumber>;
105
+ fps: z.ZodOptional<z.ZodNumber>;
106
+ videobitrate: z.ZodOptional<z.ZodNumber>;
107
+ videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
+ audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ camera: string;
111
+ resolution?: string | undefined;
112
+ compression?: number | undefined;
113
+ audio?: 0 | 1 | undefined;
114
+ fps?: number | undefined;
115
+ videobitrate?: number | undefined;
116
+ videomaxbitrate?: number | undefined;
117
+ }, {
118
+ camera: string;
119
+ resolution?: string | undefined;
120
+ compression?: number | undefined;
121
+ audio?: 0 | 1 | undefined;
122
+ fps?: number | undefined;
123
+ videobitrate?: number | undefined;
124
+ videomaxbitrate?: number | undefined;
125
+ }>;
126
+ } & {
127
+ type: z.ZodLiteral<"wowza">;
128
+ }, "strip", z.ZodTypeAny, {
129
+ type: "wowza";
130
+ enabled: boolean;
131
+ id: number;
132
+ active: boolean;
133
+ title: string;
134
+ trigger: {
135
+ type: "manual";
136
+ ioPort: string | null;
137
+ } | {
138
+ type: "onetime";
139
+ startTime: number;
140
+ stopTime: number;
141
+ } | {
142
+ type: "recurrent";
143
+ schedule: {
144
+ start: {
145
+ day: number;
146
+ timeS: number;
147
+ };
148
+ stop: {
149
+ day: number;
150
+ timeS: number;
151
+ };
152
+ isActive: boolean;
153
+ }[];
154
+ };
155
+ inputType: "RTSP_URL" | "CSw" | "CRS";
156
+ internalVapixParameters: {
157
+ camera: string;
158
+ resolution?: string | undefined;
159
+ compression?: number | undefined;
160
+ audio?: 0 | 1 | undefined;
161
+ fps?: number | undefined;
162
+ videobitrate?: number | undefined;
163
+ videomaxbitrate?: number | undefined;
164
+ };
165
+ }, {
166
+ type: "wowza";
167
+ enabled: boolean;
168
+ id: number;
169
+ active: boolean;
170
+ title: string;
171
+ trigger: {
172
+ type: "manual";
173
+ ioPort: string | null;
174
+ } | {
175
+ type: "onetime";
176
+ startTime: number;
177
+ stopTime: number;
178
+ } | {
179
+ type: "recurrent";
180
+ schedule: {
181
+ start: {
182
+ day: number;
183
+ timeS: number;
184
+ };
185
+ stop: {
186
+ day: number;
187
+ timeS: number;
188
+ };
189
+ isActive: boolean;
190
+ }[];
191
+ };
192
+ inputType: "RTSP_URL" | "CSw" | "CRS";
193
+ internalVapixParameters: {
194
+ camera: string;
195
+ resolution?: string | undefined;
196
+ compression?: number | undefined;
197
+ audio?: 0 | 1 | undefined;
198
+ fps?: number | undefined;
199
+ videobitrate?: number | undefined;
200
+ videomaxbitrate?: number | undefined;
201
+ };
202
+ }>;
@@ -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.wowzaSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const streamCommonTypes_1 = require("./streamCommonTypes");
9
+ exports.wowzaSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
+ type: zod_1.default.literal('wowza'),
11
+ });
@@ -97,68 +97,36 @@ export declare const youtubeSchema: z.ZodObject<{
97
97
  isActive: boolean;
98
98
  }[];
99
99
  }>]>;
100
- audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
101
- source: z.ZodLiteral<"none">;
100
+ inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
+ internalVapixParameters: z.ZodObject<{
102
+ camera: z.ZodString;
103
+ resolution: z.ZodOptional<z.ZodString>;
104
+ compression: z.ZodOptional<z.ZodNumber>;
105
+ fps: z.ZodOptional<z.ZodNumber>;
106
+ videobitrate: z.ZodOptional<z.ZodNumber>;
107
+ videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
+ audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
102
109
  }, "strip", z.ZodTypeAny, {
103
- source: "none";
110
+ camera: string;
111
+ resolution?: string | undefined;
112
+ compression?: number | undefined;
113
+ audio?: 0 | 1 | undefined;
114
+ fps?: number | undefined;
115
+ videobitrate?: number | undefined;
116
+ videomaxbitrate?: number | undefined;
104
117
  }, {
105
- source: "none";
106
- }>, z.ZodObject<{
107
- source: z.ZodLiteral<"microphone">;
108
- channel: z.ZodNumber;
109
- }, "strip", z.ZodTypeAny, {
110
- channel: number;
111
- source: "microphone";
112
- }, {
113
- channel: number;
114
- source: "microphone";
115
- }>, z.ZodObject<{
116
- source: z.ZodLiteral<"file">;
117
- fileName: z.ZodString;
118
- filePath: z.ZodString;
119
- }, "strip", z.ZodTypeAny, {
120
- source: "file";
121
- fileName: string;
122
- filePath: string;
123
- }, {
124
- source: "file";
125
- fileName: string;
126
- filePath: string;
127
- }>, z.ZodObject<{
128
- source: z.ZodLiteral<"url">;
129
- fileName: z.ZodString;
130
- fileUrl: z.ZodString;
131
- avSyncMsec: z.ZodNumber;
132
- }, "strip", z.ZodTypeAny, {
133
- source: "url";
134
- fileName: string;
135
- fileUrl: string;
136
- avSyncMsec: number;
137
- }, {
138
- source: "url";
139
- fileName: string;
140
- fileUrl: string;
141
- avSyncMsec: number;
142
- }>]>;
118
+ camera: string;
119
+ resolution?: string | undefined;
120
+ compression?: number | undefined;
121
+ audio?: 0 | 1 | undefined;
122
+ fps?: number | undefined;
123
+ videobitrate?: number | undefined;
124
+ videomaxbitrate?: number | undefined;
125
+ }>;
143
126
  } & {
144
127
  type: z.ZodLiteral<"youtube">;
145
128
  }, "strip", z.ZodTypeAny, {
146
129
  type: "youtube";
147
- audio: {
148
- source: "none";
149
- } | {
150
- channel: number;
151
- source: "microphone";
152
- } | {
153
- source: "file";
154
- fileName: string;
155
- filePath: string;
156
- } | {
157
- source: "url";
158
- fileName: string;
159
- fileUrl: string;
160
- avSyncMsec: number;
161
- };
162
130
  enabled: boolean;
163
131
  id: number;
164
132
  active: boolean;
@@ -184,23 +152,18 @@ export declare const youtubeSchema: z.ZodObject<{
184
152
  isActive: boolean;
185
153
  }[];
186
154
  };
155
+ inputType: "RTSP_URL" | "CSw" | "CRS";
156
+ internalVapixParameters: {
157
+ camera: string;
158
+ resolution?: string | undefined;
159
+ compression?: number | undefined;
160
+ audio?: 0 | 1 | undefined;
161
+ fps?: number | undefined;
162
+ videobitrate?: number | undefined;
163
+ videomaxbitrate?: number | undefined;
164
+ };
187
165
  }, {
188
166
  type: "youtube";
189
- audio: {
190
- source: "none";
191
- } | {
192
- channel: number;
193
- source: "microphone";
194
- } | {
195
- source: "file";
196
- fileName: string;
197
- filePath: string;
198
- } | {
199
- source: "url";
200
- fileName: string;
201
- fileUrl: string;
202
- avSyncMsec: number;
203
- };
204
167
  enabled: boolean;
205
168
  id: number;
206
169
  active: boolean;
@@ -226,4 +189,14 @@ export declare const youtubeSchema: z.ZodObject<{
226
189
  isActive: boolean;
227
190
  }[];
228
191
  };
192
+ inputType: "RTSP_URL" | "CSw" | "CRS";
193
+ internalVapixParameters: {
194
+ camera: string;
195
+ resolution?: string | undefined;
196
+ compression?: number | undefined;
197
+ audio?: 0 | 1 | undefined;
198
+ fps?: number | undefined;
199
+ videobitrate?: number | undefined;
200
+ videomaxbitrate?: number | undefined;
201
+ };
229
202
  }>;
@@ -1,27 +1,48 @@
1
1
  import { z } from 'zod';
2
2
  import { facebookSchema } from './facebookSchema';
3
- import { hlsSchema } from './hlsSchema';
4
3
  import { mpegDvbSchema } from './mpegDvbSchema';
5
4
  import { rtmpSchema } from './rtmpSchema';
6
5
  import { sdCardSchema } from './sdCardSchema';
7
6
  import { windySchema } from './windySchema';
8
7
  import { youtubeSchema } from './youtubeSchema';
8
+ import { vimeoSchema } from './vimeoSchema';
9
+ import { twitchSchema } from './twitchSchema';
10
+ import { churchSchema } from './churchSchema';
11
+ import { srtSchema } from './srtSchema';
12
+ import { daCastSchema } from './daCastSchema';
13
+ import { hlsPullSchema } from './hlsPullSchema';
14
+ import { hlsPushSchema } from './hlsPushSchema';
15
+ import { wowzaSchema } from './wowzaSchema';
16
+ import { dailymotionSchema } from './dailymotionSchema';
17
+ import { ibmSchema } from './ibmSchema';
18
+ import { microsoftAzureSchema } from './microsoftAzureSchema';
19
+ import { microsoftStreamSchema } from './microsoftStreamSchema';
20
+ import { gameChangerSchema } from './gameChangerSchema';
9
21
  export const streamSchema = z.discriminatedUnion('type', [
10
22
  facebookSchema,
11
- hlsSchema,
12
23
  mpegDvbSchema,
13
24
  rtmpSchema,
14
25
  sdCardSchema,
15
26
  windySchema,
16
27
  youtubeSchema,
28
+ vimeoSchema,
29
+ twitchSchema,
30
+ churchSchema,
31
+ srtSchema,
32
+ daCastSchema,
33
+ hlsPullSchema,
34
+ hlsPushSchema,
35
+ wowzaSchema,
36
+ dailymotionSchema,
37
+ ibmSchema,
38
+ microsoftAzureSchema,
39
+ microsoftStreamSchema,
40
+ gameChangerSchema,
17
41
  ]);
18
42
  export const streamListSchema = z.object({ streamList: z.array(streamSchema) });
19
43
  export const isFacebookStream = (stream) => {
20
44
  return stream.type === 'facebook';
21
45
  };
22
- export const isHlsStream = (stream) => {
23
- return stream.type === 'hls';
24
- };
25
46
  export const isMpegDvbStream = (stream) => {
26
47
  return stream.type === 'mpeg_dvb';
27
48
  };
@@ -37,6 +58,45 @@ export const isWindyStream = (stream) => {
37
58
  export const isYouTubeStream = (stream) => {
38
59
  return stream.type === 'youtube';
39
60
  };
61
+ export const isVimeoStream = (stream) => {
62
+ return stream.type === 'vimeo';
63
+ };
64
+ export const isTwitchStream = (stream) => {
65
+ return stream.type === 'twitch';
66
+ };
67
+ export const isChurchStream = (stream) => {
68
+ return stream.type === 'church';
69
+ };
70
+ export const isSrtStream = (stream) => {
71
+ return stream.type === 'srt';
72
+ };
73
+ export const isDaCastStream = (stream) => {
74
+ return stream.type === 'da_cast';
75
+ };
76
+ export const isHlsPullStream = (stream) => {
77
+ return stream.type === 'hls_pull';
78
+ };
79
+ export const isHlsPushStream = (stream) => {
80
+ return stream.type === 'hls_push';
81
+ };
82
+ export const isWowzaStream = (stream) => {
83
+ return stream.type === 'wowza';
84
+ };
85
+ export const isDailymotionStream = (stream) => {
86
+ return stream.type === 'dailymotion';
87
+ };
88
+ export const isIbmStream = (stream) => {
89
+ return stream.type === 'ibm';
90
+ };
91
+ export const isMicrosoftAzureStream = (stream) => {
92
+ return stream.type === 'microsoft_azure';
93
+ };
94
+ export const isMicrosoftStream = (stream) => {
95
+ return stream.type === 'microsoft_stream';
96
+ };
97
+ export const isGameChangerStream = (stream) => {
98
+ return stream.type === 'game_changer';
99
+ };
40
100
  export var AudioType;
41
101
  (function (AudioType) {
42
102
  AudioType[AudioType["MP3"] = 0] = "MP3";
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const churchSchema = streamCommonSchema.extend({
4
+ type: z.literal('church'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const daCastSchema = streamCommonSchema.extend({
4
+ type: z.literal('da_cast'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const dailymotionSchema = streamCommonSchema.extend({
4
+ type: z.literal('dailymotion'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const gameChangerSchema = streamCommonSchema.extend({
4
+ type: z.literal('game_changer'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const hlsPullSchema = streamCommonSchema.extend({
4
+ type: z.literal('hls_pull'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const hlsPushSchema = streamCommonSchema.extend({
4
+ type: z.literal('hls_push'),
5
+ });
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
- export const hlsSchema = streamCommonSchema.extend({
4
- type: z.literal('hls'),
3
+ export const ibmSchema = streamCommonSchema.extend({
4
+ type: z.literal('ibm'),
5
5
  });
@@ -1,7 +1,6 @@
1
1
  export * from './CamStreamerAPI';
2
2
  export * from './streamCommonTypes';
3
3
  export * from './facebookSchema';
4
- export * from './hlsSchema';
5
4
  export * from './mpegDvbSchema';
6
5
  export * from './rtmpSchema';
7
6
  export * from './sdCardSchema';
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const microsoftAzureSchema = streamCommonSchema.extend({
4
+ type: z.literal('microsoft_azure'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const microsoftStreamSchema = streamCommonSchema.extend({
4
+ type: z.literal('microsoft_stream'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const srtSchema = streamCommonSchema.extend({
4
+ type: z.literal('srt'),
5
+ });
@@ -1,12 +1,25 @@
1
1
  import { z } from 'zod';
2
+ import { booleanSchema } from '../common';
2
3
  export const streamTypeSchema = z.union([
3
4
  z.literal('youtube'),
4
5
  z.literal('facebook'),
5
6
  z.literal('sd_card'),
6
7
  z.literal('windy'),
7
8
  z.literal('mpeg_dvb'),
8
- z.literal('hls'),
9
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'),
10
23
  ]);
11
24
  const scheduleSchema = z.object({
12
25
  start: z.object({
@@ -30,28 +43,22 @@ export const streamTriggerSchema = z.discriminatedUnion('type', [
30
43
  schedule: z.array(scheduleSchema),
31
44
  }),
32
45
  ]);
33
- export const streamAudioSchema = z.discriminatedUnion('source', [
34
- z.object({
35
- source: z.literal('none'),
36
- }),
37
- z.object({ source: z.literal('microphone'), channel: z.number().int().min(0) }),
38
- z.object({
39
- source: z.literal('file'),
40
- fileName: z.string(),
41
- filePath: z.string(),
42
- }),
43
- z.object({
44
- source: z.literal('url'),
45
- fileName: z.string(),
46
- fileUrl: z.string(),
47
- avSyncMsec: z.number().int().nonnegative(),
48
- }),
49
- ]);
46
+ export const streamInputTypeSchema = z.union([z.literal('CSw'), z.literal('CRS'), z.literal('RTSP_URL')]);
47
+ export const internalVapixParametersSchema = z.object({
48
+ camera: z.string(),
49
+ resolution: z.string().optional(),
50
+ compression: z.number().optional(),
51
+ fps: z.number().int().optional(),
52
+ videobitrate: z.number().int().optional(),
53
+ videomaxbitrate: z.number().int().optional(),
54
+ audio: booleanSchema.optional(),
55
+ });
50
56
  export const streamCommonSchema = z.object({
51
57
  id: z.number(),
52
58
  enabled: z.boolean(),
53
59
  active: z.boolean(),
54
60
  title: z.string(),
55
61
  trigger: streamTriggerSchema,
56
- audio: streamAudioSchema,
62
+ inputType: streamInputTypeSchema,
63
+ internalVapixParameters: internalVapixParametersSchema,
57
64
  });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const twitchSchema = streamCommonSchema.extend({
4
+ type: z.literal('twitch'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const vimeoSchema = streamCommonSchema.extend({
4
+ type: z.literal('vimeo'),
5
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ import { streamCommonSchema } from './streamCommonTypes';
3
+ export const wowzaSchema = streamCommonSchema.extend({
4
+ type: z.literal('wowza'),
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.96",
3
+ "version": "4.0.0-beta.97",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {