camstreamerlib 4.0.0-beta.94 → 4.0.0-beta.96

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 (83) hide show
  1. package/cjs/CamStreamerAPI.d.ts +219 -1031
  2. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +1862 -7518
  3. package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +16 -82
  4. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +71 -44
  5. package/cjs/types/CamStreamerAPI/{churchSchema.d.ts → hlsSchema.d.ts} +75 -48
  6. package/cjs/types/CamStreamerAPI/{ibmSchema.js → hlsSchema.js} +3 -3
  7. package/cjs/types/CamStreamerAPI/index.d.ts +1 -0
  8. package/cjs/types/CamStreamerAPI/index.js +1 -0
  9. package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +71 -44
  10. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  11. package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +80 -44
  12. package/cjs/types/CamStreamerAPI/rtmpSchema.js +3 -0
  13. package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +71 -44
  14. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +115 -71
  15. package/cjs/types/CamStreamerAPI/streamCommonTypes.js +20 -26
  16. package/cjs/types/CamStreamerAPI/windySchema.d.ts +71 -44
  17. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +71 -44
  18. package/esm/types/CamStreamerAPI/CamStreamerAPI.js +14 -68
  19. package/esm/types/CamStreamerAPI/{ibmSchema.js → hlsSchema.js} +2 -2
  20. package/esm/types/CamStreamerAPI/index.js +1 -0
  21. package/esm/types/CamStreamerAPI/rtmpSchema.js +3 -0
  22. package/esm/types/CamStreamerAPI/streamCommonTypes.js +19 -25
  23. package/package.json +1 -1
  24. package/types/CamStreamerAPI.d.ts +219 -1031
  25. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +1862 -7518
  26. package/types/types/CamStreamerAPI/facebookSchema.d.ts +71 -44
  27. package/{cjs/types/CamStreamerAPI/ibmSchema.d.ts → types/types/CamStreamerAPI/hlsSchema.d.ts} +75 -48
  28. package/types/types/CamStreamerAPI/index.d.ts +1 -0
  29. package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +71 -44
  30. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  31. package/types/types/CamStreamerAPI/rtmpSchema.d.ts +80 -44
  32. package/types/types/CamStreamerAPI/sdCardSchema.d.ts +71 -44
  33. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +115 -71
  34. package/types/types/CamStreamerAPI/windySchema.d.ts +71 -44
  35. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +71 -44
  36. package/cjs/types/CamStreamerAPI/churchSchema.js +0 -11
  37. package/cjs/types/CamStreamerAPI/daCastSchema.d.ts +0 -202
  38. package/cjs/types/CamStreamerAPI/daCastSchema.js +0 -11
  39. package/cjs/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -202
  40. package/cjs/types/CamStreamerAPI/dailymotionSchema.js +0 -11
  41. package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -202
  42. package/cjs/types/CamStreamerAPI/gameChangerSchema.js +0 -11
  43. package/cjs/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -202
  44. package/cjs/types/CamStreamerAPI/hlsPullSchema.js +0 -11
  45. package/cjs/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -202
  46. package/cjs/types/CamStreamerAPI/hlsPushSchema.js +0 -11
  47. package/cjs/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -202
  48. package/cjs/types/CamStreamerAPI/microsoftAzureSchema.js +0 -11
  49. package/cjs/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -202
  50. package/cjs/types/CamStreamerAPI/microsoftStreamSchema.js +0 -11
  51. package/cjs/types/CamStreamerAPI/srtSchema.d.ts +0 -202
  52. package/cjs/types/CamStreamerAPI/srtSchema.js +0 -11
  53. package/cjs/types/CamStreamerAPI/twitchSchema.d.ts +0 -202
  54. package/cjs/types/CamStreamerAPI/twitchSchema.js +0 -11
  55. package/cjs/types/CamStreamerAPI/vimeoSchema.d.ts +0 -202
  56. package/cjs/types/CamStreamerAPI/vimeoSchema.js +0 -11
  57. package/cjs/types/CamStreamerAPI/wowzaSchema.d.ts +0 -202
  58. package/cjs/types/CamStreamerAPI/wowzaSchema.js +0 -11
  59. package/esm/types/CamStreamerAPI/churchSchema.js +0 -5
  60. package/esm/types/CamStreamerAPI/daCastSchema.js +0 -5
  61. package/esm/types/CamStreamerAPI/dailymotionSchema.js +0 -5
  62. package/esm/types/CamStreamerAPI/gameChangerSchema.js +0 -5
  63. package/esm/types/CamStreamerAPI/hlsPullSchema.js +0 -5
  64. package/esm/types/CamStreamerAPI/hlsPushSchema.js +0 -5
  65. package/esm/types/CamStreamerAPI/microsoftAzureSchema.js +0 -5
  66. package/esm/types/CamStreamerAPI/microsoftStreamSchema.js +0 -5
  67. package/esm/types/CamStreamerAPI/srtSchema.js +0 -5
  68. package/esm/types/CamStreamerAPI/twitchSchema.js +0 -5
  69. package/esm/types/CamStreamerAPI/vimeoSchema.js +0 -5
  70. package/esm/types/CamStreamerAPI/wowzaSchema.js +0 -5
  71. package/types/types/CamStreamerAPI/churchSchema.d.ts +0 -202
  72. package/types/types/CamStreamerAPI/daCastSchema.d.ts +0 -202
  73. package/types/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -202
  74. package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -202
  75. package/types/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -202
  76. package/types/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -202
  77. package/types/types/CamStreamerAPI/ibmSchema.d.ts +0 -202
  78. package/types/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -202
  79. package/types/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -202
  80. package/types/types/CamStreamerAPI/srtSchema.d.ts +0 -202
  81. package/types/types/CamStreamerAPI/twitchSchema.d.ts +0 -202
  82. package/types/types/CamStreamerAPI/vimeoSchema.d.ts +0 -202
  83. package/types/types/CamStreamerAPI/wowzaSchema.d.ts +0 -202
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.streamCommonSchema = exports.internalVapixParametersSchema = exports.streamInputTypeSchema = exports.streamTriggerSchema = exports.streamTypeSchema = void 0;
3
+ exports.streamCommonSchema = exports.streamAudioSchema = exports.streamTriggerSchema = exports.streamTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.streamTypeSchema = zod_1.z.union([
6
6
  zod_1.z.literal('youtube'),
@@ -8,20 +8,8 @@ exports.streamTypeSchema = zod_1.z.union([
8
8
  zod_1.z.literal('sd_card'),
9
9
  zod_1.z.literal('windy'),
10
10
  zod_1.z.literal('mpeg_dvb'),
11
+ zod_1.z.literal('hls'),
11
12
  zod_1.z.literal('rtmp'),
12
- zod_1.z.literal('dailymotion'),
13
- zod_1.z.literal('ibm'),
14
- zod_1.z.literal('hls_pull'),
15
- zod_1.z.literal('hls_push'),
16
- zod_1.z.literal('wowza'),
17
- zod_1.z.literal('microsoft_stream'),
18
- zod_1.z.literal('microsoft_azure'),
19
- zod_1.z.literal('vimeo'),
20
- zod_1.z.literal('twitch'),
21
- zod_1.z.literal('church'),
22
- zod_1.z.literal('srt'),
23
- zod_1.z.literal('da_cast'),
24
- zod_1.z.literal('game_changer'),
25
13
  ]);
26
14
  const scheduleSchema = zod_1.z.object({
27
15
  start: zod_1.z.object({
@@ -45,22 +33,28 @@ exports.streamTriggerSchema = zod_1.z.discriminatedUnion('type', [
45
33
  schedule: zod_1.z.array(scheduleSchema),
46
34
  }),
47
35
  ]);
48
- exports.streamInputTypeSchema = zod_1.z.union([zod_1.z.literal('CSw'), zod_1.z.literal('CRS'), zod_1.z.literal('RTSP_URL')]);
49
- exports.internalVapixParametersSchema = zod_1.z.object({
50
- camera: zod_1.z.string(),
51
- resolution: zod_1.z.string().optional(),
52
- compression: zod_1.z.number().optional(),
53
- fps: zod_1.z.number().int().optional(),
54
- videobitrate: zod_1.z.number().int().optional(),
55
- videomaxbitrate: zod_1.z.number().int().optional(),
56
- audio: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]).optional(),
57
- });
36
+ exports.streamAudioSchema = zod_1.z.discriminatedUnion('source', [
37
+ zod_1.z.object({
38
+ source: zod_1.z.literal('none'),
39
+ }),
40
+ zod_1.z.object({ source: zod_1.z.literal('microphone'), channel: zod_1.z.number().int().min(0) }),
41
+ zod_1.z.object({
42
+ source: zod_1.z.literal('file'),
43
+ fileName: zod_1.z.string(),
44
+ filePath: zod_1.z.string(),
45
+ }),
46
+ zod_1.z.object({
47
+ source: zod_1.z.literal('url'),
48
+ fileName: zod_1.z.string(),
49
+ fileUrl: zod_1.z.string(),
50
+ avSyncMsec: zod_1.z.number().int().nonnegative(),
51
+ }),
52
+ ]);
58
53
  exports.streamCommonSchema = zod_1.z.object({
59
54
  id: zod_1.z.number(),
60
55
  enabled: zod_1.z.boolean(),
61
56
  active: zod_1.z.boolean(),
62
57
  title: zod_1.z.string(),
63
58
  trigger: exports.streamTriggerSchema,
64
- inputType: exports.streamInputTypeSchema,
65
- internalVapixParameters: exports.internalVapixParametersSchema,
59
+ audio: exports.streamAudioSchema,
66
60
  });
@@ -97,36 +97,68 @@ export declare const windySchema: z.ZodObject<{
97
97
  isActive: boolean;
98
98
  }[];
99
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>]>>;
100
+ audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
101
+ source: z.ZodLiteral<"none">;
109
102
  }, "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;
103
+ source: "none";
117
104
  }, {
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
- }>;
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
+ }>]>;
126
143
  } & {
127
144
  type: z.ZodLiteral<"windy">;
128
145
  }, "strip", z.ZodTypeAny, {
129
146
  type: "windy";
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
+ };
130
162
  enabled: boolean;
131
163
  id: number;
132
164
  active: boolean;
@@ -152,18 +184,23 @@ export declare const windySchema: z.ZodObject<{
152
184
  isActive: boolean;
153
185
  }[];
154
186
  };
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
187
  }, {
166
188
  type: "windy";
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
+ };
167
204
  enabled: boolean;
168
205
  id: number;
169
206
  active: boolean;
@@ -189,14 +226,4 @@ export declare const windySchema: z.ZodObject<{
189
226
  isActive: boolean;
190
227
  }[];
191
228
  };
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
229
  }>;
@@ -97,36 +97,68 @@ export declare const youtubeSchema: z.ZodObject<{
97
97
  isActive: boolean;
98
98
  }[];
99
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>]>>;
100
+ audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
101
+ source: z.ZodLiteral<"none">;
109
102
  }, "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;
103
+ source: "none";
117
104
  }, {
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
- }>;
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
+ }>]>;
126
143
  } & {
127
144
  type: z.ZodLiteral<"youtube">;
128
145
  }, "strip", z.ZodTypeAny, {
129
146
  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
+ };
130
162
  enabled: boolean;
131
163
  id: number;
132
164
  active: boolean;
@@ -152,18 +184,23 @@ export declare const youtubeSchema: z.ZodObject<{
152
184
  isActive: boolean;
153
185
  }[];
154
186
  };
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
187
  }, {
166
188
  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
+ };
167
204
  enabled: boolean;
168
205
  id: number;
169
206
  active: boolean;
@@ -189,14 +226,4 @@ export declare const youtubeSchema: z.ZodObject<{
189
226
  isActive: boolean;
190
227
  }[];
191
228
  };
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
229
  }>;
@@ -1,48 +1,27 @@
1
1
  import { z } from 'zod';
2
2
  import { facebookSchema } from './facebookSchema';
3
+ import { hlsSchema } from './hlsSchema';
3
4
  import { mpegDvbSchema } from './mpegDvbSchema';
4
5
  import { rtmpSchema } from './rtmpSchema';
5
6
  import { sdCardSchema } from './sdCardSchema';
6
7
  import { windySchema } from './windySchema';
7
8
  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';
21
9
  export const streamSchema = z.discriminatedUnion('type', [
22
10
  facebookSchema,
11
+ hlsSchema,
23
12
  mpegDvbSchema,
24
13
  rtmpSchema,
25
14
  sdCardSchema,
26
15
  windySchema,
27
16
  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,
41
17
  ]);
42
18
  export const streamListSchema = z.object({ streamList: z.array(streamSchema) });
43
19
  export const isFacebookStream = (stream) => {
44
20
  return stream.type === 'facebook';
45
21
  };
22
+ export const isHlsStream = (stream) => {
23
+ return stream.type === 'hls';
24
+ };
46
25
  export const isMpegDvbStream = (stream) => {
47
26
  return stream.type === 'mpeg_dvb';
48
27
  };
@@ -58,45 +37,6 @@ export const isWindyStream = (stream) => {
58
37
  export const isYouTubeStream = (stream) => {
59
38
  return stream.type === 'youtube';
60
39
  };
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
- };
100
40
  export var AudioType;
101
41
  (function (AudioType) {
102
42
  AudioType[AudioType["MP3"] = 0] = "MP3";
@@ -119,7 +59,13 @@ export const audioFileSchema = z.object({
119
59
  storage: audioFileStorageTypeSchema,
120
60
  });
121
61
  export const audioFileListSchema = z.array(audioFileSchema);
122
- export const audioFileDataSchema = z.object({
123
- code: z.number(),
124
- list: audioFileListSchema,
62
+ export const audioUrlSchema = z.object({
63
+ fileUrl: z.string(),
64
+ name: z.string(),
65
+ storage: z.literal('url'),
66
+ });
67
+ export const audioLocalSchema = z.object({
68
+ file: z.instanceof(File),
69
+ name: z.string(),
70
+ storage: z.enum(['flash', 'SD0']),
125
71
  });
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
- export const ibmSchema = streamCommonSchema.extend({
4
- type: z.literal('ibm'),
3
+ export const hlsSchema = streamCommonSchema.extend({
4
+ type: z.literal('hls'),
5
5
  });
@@ -1,6 +1,7 @@
1
1
  export * from './CamStreamerAPI';
2
2
  export * from './streamCommonTypes';
3
3
  export * from './facebookSchema';
4
+ export * from './hlsSchema';
4
5
  export * from './mpegDvbSchema';
5
6
  export * from './rtmpSchema';
6
7
  export * from './sdCardSchema';
@@ -2,4 +2,7 @@ import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
3
  export const rtmpSchema = streamCommonSchema.extend({
4
4
  type: z.literal('rtmp'),
5
+ rtmpUrl: z.string().url(),
6
+ streamKey: z.string(),
7
+ streamIdentifier: z.string().optional(),
5
8
  });
@@ -5,20 +5,8 @@ export const streamTypeSchema = z.union([
5
5
  z.literal('sd_card'),
6
6
  z.literal('windy'),
7
7
  z.literal('mpeg_dvb'),
8
+ z.literal('hls'),
8
9
  z.literal('rtmp'),
9
- z.literal('dailymotion'),
10
- z.literal('ibm'),
11
- z.literal('hls_pull'),
12
- z.literal('hls_push'),
13
- z.literal('wowza'),
14
- z.literal('microsoft_stream'),
15
- z.literal('microsoft_azure'),
16
- z.literal('vimeo'),
17
- z.literal('twitch'),
18
- z.literal('church'),
19
- z.literal('srt'),
20
- z.literal('da_cast'),
21
- z.literal('game_changer'),
22
10
  ]);
23
11
  const scheduleSchema = z.object({
24
12
  start: z.object({
@@ -42,22 +30,28 @@ export const streamTriggerSchema = z.discriminatedUnion('type', [
42
30
  schedule: z.array(scheduleSchema),
43
31
  }),
44
32
  ]);
45
- export const streamInputTypeSchema = z.union([z.literal('CSw'), z.literal('CRS'), z.literal('RTSP_URL')]);
46
- export const internalVapixParametersSchema = z.object({
47
- camera: z.string(),
48
- resolution: z.string().optional(),
49
- compression: z.number().optional(),
50
- fps: z.number().int().optional(),
51
- videobitrate: z.number().int().optional(),
52
- videomaxbitrate: z.number().int().optional(),
53
- audio: z.union([z.literal(0), z.literal(1)]).optional(),
54
- });
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
+ ]);
55
50
  export const streamCommonSchema = z.object({
56
51
  id: z.number(),
57
52
  enabled: z.boolean(),
58
53
  active: z.boolean(),
59
54
  title: z.string(),
60
55
  trigger: streamTriggerSchema,
61
- inputType: streamInputTypeSchema,
62
- internalVapixParameters: internalVapixParametersSchema,
56
+ audio: streamAudioSchema,
63
57
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.94",
3
+ "version": "4.0.0-beta.96",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {