camstreamerlib 4.0.0-beta.135 → 4.0.0-beta.137

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 (31) hide show
  1. package/cjs/CamStreamerAPI.d.ts +40 -0
  2. package/cjs/CamStreamerAPI.js +5 -0
  3. package/cjs/PlaneTrackerAPI.d.ts +1 -1
  4. package/cjs/VapixAPI.d.ts +6 -1
  5. package/cjs/VapixAPI.js +30 -2
  6. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +342 -2
  7. package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +20 -20
  8. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +7 -0
  9. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +7 -0
  10. package/cjs/types/CamStreamerAPI/streamCommonTypes.js +1 -0
  11. package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +141 -0
  12. package/cjs/types/CamStreamerAPI/streamsSchema.js +40 -18
  13. package/cjs/types/CamStreamerAPI/windySchema.d.ts +7 -0
  14. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +7 -0
  15. package/cjs/types/GenetecAgent.d.ts +2 -2
  16. package/esm/CamStreamerAPI.js +5 -0
  17. package/esm/VapixAPI.js +30 -2
  18. package/esm/types/CamStreamerAPI/CamStreamerAPI.js +21 -21
  19. package/esm/types/CamStreamerAPI/streamCommonTypes.js +1 -0
  20. package/esm/types/CamStreamerAPI/streamsSchema.js +39 -17
  21. package/package.json +1 -1
  22. package/types/CamStreamerAPI.d.ts +40 -0
  23. package/types/PlaneTrackerAPI.d.ts +1 -1
  24. package/types/VapixAPI.d.ts +6 -1
  25. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +342 -2
  26. package/types/types/CamStreamerAPI/facebookSchema.d.ts +7 -0
  27. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +7 -0
  28. package/types/types/CamStreamerAPI/streamsSchema.d.ts +141 -0
  29. package/types/types/CamStreamerAPI/windySchema.d.ts +7 -0
  30. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +7 -0
  31. package/types/types/GenetecAgent.d.ts +2 -2
@@ -3,57 +3,79 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.youtubeRtmpSchema = exports.wowzaSchema = exports.vimeoSchema = exports.twitchSchema = exports.srtSchema = exports.sdCardSchema = exports.rtmpSchema = exports.microsoftStreamSchema = exports.microsoftAzureSchema = exports.mpegDvbSchema = exports.ibmSchema = exports.hlsPushSchema = exports.hlsPullSchema = exports.gameChangerSchema = exports.facebookRtmpSchema = exports.dailymotionSchema = exports.daCastSchema = void 0;
6
+ exports.youtubeRtmpSchema = exports.wowzaSchema = exports.vimeoSchema = exports.twitchSchema = exports.srtSchema = exports.sdCardSchema = exports.rtmpSchema = exports.microsoftStreamSchema = exports.microsoftAzureSchema = exports.mpegDvbSchema = exports.ibmSchema = exports.hlsPushSchema = exports.hlsPullSchema = exports.gameChangerSchema = exports.facebookRtmpSchema = exports.dailymotionSchema = exports.daCastSchema = exports.streamPlatforms = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const streamCommonTypes_1 = require("./streamCommonTypes");
9
+ exports.streamPlatforms = {
10
+ da_cast: 'da_cast',
11
+ dailymotion: 'dailymotion',
12
+ facebook_rtmp: 'facebook_rtmp',
13
+ game_changer: 'game_changer',
14
+ hls_pull: 'hls_pull',
15
+ hls_push: 'hls_push',
16
+ ibm: 'ibm',
17
+ mpeg_dvb: 'mpeg_dvb',
18
+ microsoft_azure: 'microsoft_azure',
19
+ microsoft_stream: 'microsoft_stream',
20
+ rtmp: 'rtmp',
21
+ sd_card: 'sd_card',
22
+ srt: 'srt',
23
+ twitch: 'twitch',
24
+ vimeo: 'vimeo',
25
+ wowza: 'wowza',
26
+ youtube_rtmp: 'youtube_rtmp',
27
+ windy: 'windy',
28
+ youtube: 'youtube',
29
+ facebook: 'facebook',
30
+ };
9
31
  exports.daCastSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
- platform: zod_1.default.literal('da_cast'),
32
+ platform: zod_1.default.literal(exports.streamPlatforms.da_cast),
11
33
  });
12
34
  exports.dailymotionSchema = streamCommonTypes_1.streamCommonSchema.extend({
13
- platform: zod_1.default.literal('dailymotion'),
35
+ platform: zod_1.default.literal(exports.streamPlatforms.dailymotion),
14
36
  });
15
37
  exports.facebookRtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
16
- platform: zod_1.default.literal('facebook_rtmp'),
38
+ platform: zod_1.default.literal(exports.streamPlatforms.facebook_rtmp),
17
39
  });
18
40
  exports.gameChangerSchema = streamCommonTypes_1.streamCommonSchema.extend({
19
- platform: zod_1.default.literal('game_changer'),
41
+ platform: zod_1.default.literal(exports.streamPlatforms.game_changer),
20
42
  });
21
43
  exports.hlsPullSchema = streamCommonTypes_1.streamCommonSchema.extend({
22
- platform: zod_1.default.literal('hls_pull'),
44
+ platform: zod_1.default.literal(exports.streamPlatforms.hls_pull),
23
45
  });
24
46
  exports.hlsPushSchema = streamCommonTypes_1.streamCommonSchema.extend({
25
- platform: zod_1.default.literal('hls_push'),
47
+ platform: zod_1.default.literal(exports.streamPlatforms.hls_push),
26
48
  });
27
49
  exports.ibmSchema = streamCommonTypes_1.streamCommonSchema.extend({
28
- platform: zod_1.default.literal('ibm'),
50
+ platform: zod_1.default.literal(exports.streamPlatforms.ibm),
29
51
  });
30
52
  exports.mpegDvbSchema = streamCommonTypes_1.streamCommonSchema.extend({
31
- platform: zod_1.default.literal('mpeg_dvb'),
53
+ platform: zod_1.default.literal(exports.streamPlatforms.mpeg_dvb),
32
54
  });
33
55
  exports.microsoftAzureSchema = streamCommonTypes_1.streamCommonSchema.extend({
34
- platform: zod_1.default.literal('microsoft_azure'),
56
+ platform: zod_1.default.literal(exports.streamPlatforms.microsoft_azure),
35
57
  });
36
58
  exports.microsoftStreamSchema = streamCommonTypes_1.streamCommonSchema.extend({
37
- platform: zod_1.default.literal('microsoft_stream'),
59
+ platform: zod_1.default.literal(exports.streamPlatforms.microsoft_stream),
38
60
  });
39
61
  exports.rtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
40
- platform: zod_1.default.literal('rtmp'),
62
+ platform: zod_1.default.literal(exports.streamPlatforms.rtmp),
41
63
  });
42
64
  exports.sdCardSchema = streamCommonTypes_1.streamCommonSchema.extend({
43
- platform: zod_1.default.literal('sd_card'),
65
+ platform: zod_1.default.literal(exports.streamPlatforms.sd_card),
44
66
  });
45
67
  exports.srtSchema = streamCommonTypes_1.streamCommonSchema.extend({
46
- platform: zod_1.default.literal('srt'),
68
+ platform: zod_1.default.literal(exports.streamPlatforms.srt),
47
69
  });
48
70
  exports.twitchSchema = streamCommonTypes_1.streamCommonSchema.extend({
49
- platform: zod_1.default.literal('twitch'),
71
+ platform: zod_1.default.literal(exports.streamPlatforms.twitch),
50
72
  });
51
73
  exports.vimeoSchema = streamCommonTypes_1.streamCommonSchema.extend({
52
- platform: zod_1.default.literal('vimeo'),
74
+ platform: zod_1.default.literal(exports.streamPlatforms.vimeo),
53
75
  });
54
76
  exports.wowzaSchema = streamCommonTypes_1.streamCommonSchema.extend({
55
- platform: zod_1.default.literal('wowza'),
77
+ platform: zod_1.default.literal(exports.streamPlatforms.wowza),
56
78
  });
57
79
  exports.youtubeRtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
58
- platform: zod_1.default.literal('youtube_rtmp'),
80
+ platform: zod_1.default.literal(exports.streamPlatforms.youtube_rtmp),
59
81
  });
@@ -108,14 +108,17 @@ export declare const windySchema: z.ZodObject<{
108
108
  type: z.ZodLiteral<"video">;
109
109
  url: z.ZodNullable<z.ZodString>;
110
110
  parameters: z.ZodString;
111
+ saveToSdCard: z.ZodBoolean;
111
112
  }, "strip", z.ZodTypeAny, {
112
113
  type: "video";
113
114
  url: string | null;
114
115
  parameters: string;
116
+ saveToSdCard: boolean;
115
117
  }, {
116
118
  type: "video";
117
119
  url: string | null;
118
120
  parameters: string;
121
+ saveToSdCard: boolean;
119
122
  }>, z.ZodObject<{
120
123
  type: z.ZodLiteral<"images">;
121
124
  url: z.ZodNullable<z.ZodString>;
@@ -169,6 +172,7 @@ export declare const windySchema: z.ZodObject<{
169
172
  type: "video";
170
173
  url: string | null;
171
174
  parameters: string;
175
+ saveToSdCard: boolean;
172
176
  } | {
173
177
  type: "images";
174
178
  url: string | null;
@@ -192,6 +196,7 @@ export declare const windySchema: z.ZodObject<{
192
196
  type: "video";
193
197
  url: string | null;
194
198
  parameters: string;
199
+ saveToSdCard: boolean;
195
200
  } | {
196
201
  type: "images";
197
202
  url: string | null;
@@ -312,6 +317,7 @@ export declare const windySchema: z.ZodObject<{
312
317
  type: "video";
313
318
  url: string | null;
314
319
  parameters: string;
320
+ saveToSdCard: boolean;
315
321
  } | {
316
322
  type: "images";
317
323
  url: string | null;
@@ -387,6 +393,7 @@ export declare const windySchema: z.ZodObject<{
387
393
  type: "video";
388
394
  url: string | null;
389
395
  parameters: string;
396
+ saveToSdCard: boolean;
390
397
  } | {
391
398
  type: "images";
392
399
  url: string | null;
@@ -108,14 +108,17 @@ export declare const youtubeSchema: z.ZodObject<{
108
108
  type: z.ZodLiteral<"video">;
109
109
  url: z.ZodNullable<z.ZodString>;
110
110
  parameters: z.ZodString;
111
+ saveToSdCard: z.ZodBoolean;
111
112
  }, "strip", z.ZodTypeAny, {
112
113
  type: "video";
113
114
  url: string | null;
114
115
  parameters: string;
116
+ saveToSdCard: boolean;
115
117
  }, {
116
118
  type: "video";
117
119
  url: string | null;
118
120
  parameters: string;
121
+ saveToSdCard: boolean;
119
122
  }>, z.ZodObject<{
120
123
  type: z.ZodLiteral<"images">;
121
124
  url: z.ZodNullable<z.ZodString>;
@@ -169,6 +172,7 @@ export declare const youtubeSchema: z.ZodObject<{
169
172
  type: "video";
170
173
  url: string | null;
171
174
  parameters: string;
175
+ saveToSdCard: boolean;
172
176
  } | {
173
177
  type: "images";
174
178
  url: string | null;
@@ -192,6 +196,7 @@ export declare const youtubeSchema: z.ZodObject<{
192
196
  type: "video";
193
197
  url: string | null;
194
198
  parameters: string;
199
+ saveToSdCard: boolean;
195
200
  } | {
196
201
  type: "images";
197
202
  url: string | null;
@@ -324,6 +329,7 @@ export declare const youtubeSchema: z.ZodObject<{
324
329
  type: "video";
325
330
  url: string | null;
326
331
  parameters: string;
332
+ saveToSdCard: boolean;
327
333
  } | {
328
334
  type: "images";
329
335
  url: string | null;
@@ -411,6 +417,7 @@ export declare const youtubeSchema: z.ZodObject<{
411
417
  type: "video";
412
418
  url: string | null;
413
419
  parameters: string;
420
+ saveToSdCard: boolean;
414
421
  } | {
415
422
  type: "images";
416
423
  url: string | null;
@@ -152,12 +152,12 @@ export declare const cameraListSchema: z.ZodArray<z.ZodObject<{
152
152
  label: z.ZodString;
153
153
  }, "strip", z.ZodTypeAny, {
154
154
  value: string;
155
- index: number;
156
155
  label: string;
156
+ index: number;
157
157
  }, {
158
158
  value: string;
159
- index: number;
160
159
  label: string;
160
+ index: number;
161
161
  }>, "many">;
162
162
  export type TCameraList = z.infer<typeof cameraListSchema>;
163
163
  export type TParams = Array<'Guid' | 'Name' | 'EntityType'>;
@@ -3,6 +3,7 @@ import { audioFileListSchema, diagnosticsSchema, srtStreamStatisticsSchema, stor
3
3
  import { UtcTimeFetchError, WsAuthorizationError, MigrationError } from './errors/errors';
4
4
  import { oldStringStreamSchema, oldStringStreamSchemaWithId, } from './types/CamStreamerAPI/oldStreamSchema';
5
5
  import { BasicAPI } from './internal/BasicAPI';
6
+ import { streamPlatforms } from './types/CamStreamerAPI';
6
7
  const BASE_PATH = '/local/camstreamer';
7
8
  export class CamStreamerAPI extends BasicAPI {
8
9
  static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
@@ -48,6 +49,10 @@ export class CamStreamerAPI extends BasicAPI {
48
49
  const oldStreamData = [];
49
50
  const invalidStreamData = [];
50
51
  for (const streamData of res.data.streamList) {
52
+ if (streamData.platform !== undefined && !Object.values(streamPlatforms).includes(streamData.platform)) {
53
+ newStreamData.push(streamData);
54
+ continue;
55
+ }
51
56
  const newStreamParse = streamSchema.safeParse(streamData);
52
57
  if (newStreamParse.success) {
53
58
  newStreamData.push(newStreamParse.data);
package/esm/VapixAPI.js CHANGED
@@ -20,7 +20,7 @@ export class VapixAPI extends BasicAPI {
20
20
  }
21
21
  return res;
22
22
  }
23
- postJson = async (path, data, headers, options) => {
23
+ async postJson(path, data, headers, options) {
24
24
  const agent = this.getClient(options?.proxyParams);
25
25
  const jsonData = JSON.stringify(data);
26
26
  const res = await agent.post({
@@ -33,7 +33,7 @@ export class VapixAPI extends BasicAPI {
33
33
  throw new ErrorWithResponse(res);
34
34
  }
35
35
  return res;
36
- };
36
+ }
37
37
  async getCameraImage(parameters, options) {
38
38
  const agent = this.getClient(options?.proxyParams);
39
39
  return (await agent.get({
@@ -415,6 +415,26 @@ export class VapixAPI extends BasicAPI {
415
415
  pwd: pass,
416
416
  }, options);
417
417
  }
418
+ async getRecordingRuleList(options) {
419
+ const res = await this._getText('/axis-cgi/record/continuous/listconfiguration.cgi', undefined, options);
420
+ return VapixAPI.parseXmlResponse(res, 'continuousrecordingconfigurations');
421
+ }
422
+ async addRecordingRule(params, options) {
423
+ const res = await this._getText('/axis-cgi/record/continuous/addconfiguration.cgi', params, options);
424
+ return VapixAPI.parseXmlResponse(res, 'configure');
425
+ }
426
+ async removeRecordingRule(profileId, options) {
427
+ const res = await this._getText('/axis-cgi/record/continuous/removeconfiguration.cgi', {
428
+ profile: profileId,
429
+ }, options);
430
+ return VapixAPI.parseXmlResponse(res, 'remove');
431
+ }
432
+ async getDiskInfo(diskId = 'all', options) {
433
+ const res = await this._getText('/axis-cgi/disks/list.cgi', {
434
+ diskid: diskId,
435
+ }, options);
436
+ return VapixAPI.parseXmlResponse(res, 'disks');
437
+ }
418
438
  async getApplicationList(options) {
419
439
  const agent = this.getClient(options?.proxyParams);
420
440
  const res = await agent.get({ path: '/axis-cgi/applications/list.cgi', timeout: options?.timeout });
@@ -568,4 +588,12 @@ export class VapixAPI extends BasicAPI {
568
588
  });
569
589
  return res;
570
590
  };
591
+ static parseXmlResponse = (xml, nodeName) => {
592
+ const doc = new DOMParser().parseFromString(xml, 'text/xml');
593
+ const node = doc.getElementsByTagName(nodeName);
594
+ if (node.length !== 1) {
595
+ throw new Error('Invalid XML from camera');
596
+ }
597
+ return node[0];
598
+ };
571
599
  }
@@ -2,7 +2,7 @@ import { boolean, z } from 'zod';
2
2
  import { facebookSchema } from './facebookSchema';
3
3
  import { windySchema } from './windySchema';
4
4
  import { youtubeSchema } from './youtubeSchema';
5
- import { daCastSchema, dailymotionSchema, facebookRtmpSchema, gameChangerSchema, hlsPullSchema, hlsPushSchema, ibmSchema, microsoftAzureSchema, microsoftStreamSchema, mpegDvbSchema, rtmpSchema, sdCardSchema, srtSchema, twitchSchema, vimeoSchema, wowzaSchema, youtubeRtmpSchema, } from './streamsSchema';
5
+ import { daCastSchema, dailymotionSchema, facebookRtmpSchema, gameChangerSchema, hlsPullSchema, hlsPushSchema, ibmSchema, microsoftAzureSchema, microsoftStreamSchema, mpegDvbSchema, rtmpSchema, sdCardSchema, srtSchema, streamPlatforms, twitchSchema, vimeoSchema, wowzaSchema, youtubeRtmpSchema, } from './streamsSchema';
6
6
  import { fileSchema } from '../common';
7
7
  export const streamSchema = z.discriminatedUnion('platform', [
8
8
  facebookSchema,
@@ -28,64 +28,64 @@ export const streamSchema = z.discriminatedUnion('platform', [
28
28
  ]);
29
29
  export const streamListSchema = z.object({ streamList: z.array(streamSchema) });
30
30
  export const isFacebookStream = (stream) => {
31
- return stream.platform === 'facebook';
31
+ return stream.platform === streamPlatforms.facebook;
32
32
  };
33
33
  export const isFacebookRtmpStream = (stream) => {
34
- return stream.platform === 'facebook_rtmp';
34
+ return stream.platform === streamPlatforms.facebook_rtmp;
35
35
  };
36
36
  export const isMpegDvbStream = (stream) => {
37
- return stream.platform === 'mpeg_dvb';
37
+ return stream.platform === streamPlatforms.mpeg_dvb;
38
38
  };
39
39
  export const isRtmpStream = (stream) => {
40
- return stream.platform === 'rtmp';
40
+ return stream.platform === streamPlatforms.rtmp;
41
41
  };
42
42
  export const isSdCardStream = (stream) => {
43
- return stream.platform === 'sd_card';
43
+ return stream.platform === streamPlatforms.sd_card;
44
44
  };
45
45
  export const isWindyStream = (stream) => {
46
- return stream.platform === 'windy';
46
+ return stream.platform === streamPlatforms.windy;
47
47
  };
48
48
  export const isYouTubeStream = (stream) => {
49
- return stream.platform === 'youtube';
49
+ return stream.platform === streamPlatforms.youtube;
50
50
  };
51
51
  export const isVimeoStream = (stream) => {
52
- return stream.platform === 'vimeo';
52
+ return stream.platform === streamPlatforms.vimeo;
53
53
  };
54
54
  export const isTwitchStream = (stream) => {
55
- return stream.platform === 'twitch';
55
+ return stream.platform === streamPlatforms.twitch;
56
56
  };
57
57
  export const isSrtStream = (stream) => {
58
- return stream.platform === 'srt';
58
+ return stream.platform === streamPlatforms.srt;
59
59
  };
60
60
  export const isDaCastStream = (stream) => {
61
- return stream.platform === 'da_cast';
61
+ return stream.platform === streamPlatforms.da_cast;
62
62
  };
63
63
  export const isHlsPullStream = (stream) => {
64
- return stream.platform === 'hls_pull';
64
+ return stream.platform === streamPlatforms.hls_pull;
65
65
  };
66
66
  export const isHlsPushStream = (stream) => {
67
- return stream.platform === 'hls_push';
67
+ return stream.platform === streamPlatforms.hls_push;
68
68
  };
69
69
  export const isWowzaStream = (stream) => {
70
- return stream.platform === 'wowza';
70
+ return stream.platform === streamPlatforms.wowza;
71
71
  };
72
72
  export const isDailymotionStream = (stream) => {
73
- return stream.platform === 'dailymotion';
73
+ return stream.platform === streamPlatforms.dailymotion;
74
74
  };
75
75
  export const isIbmStream = (stream) => {
76
- return stream.platform === 'ibm';
76
+ return stream.platform === streamPlatforms.ibm;
77
77
  };
78
78
  export const isMicrosoftAzureStream = (stream) => {
79
- return stream.platform === 'microsoft_azure';
79
+ return stream.platform === streamPlatforms.microsoft_azure;
80
80
  };
81
81
  export const isMicrosoftStream = (stream) => {
82
- return stream.platform === 'microsoft_stream';
82
+ return stream.platform === streamPlatforms.microsoft_stream;
83
83
  };
84
84
  export const isGameChangerStream = (stream) => {
85
- return stream.platform === 'game_changer';
85
+ return stream.platform === streamPlatforms.game_changer;
86
86
  };
87
87
  export const isYoutubeRtmpStream = (stream) => {
88
- return stream.platform === 'youtube_rtmp';
88
+ return stream.platform === streamPlatforms.youtube_rtmp;
89
89
  };
90
90
  export var AudioType;
91
91
  (function (AudioType) {
@@ -38,6 +38,7 @@ export const streamCommonSchema = z.object({
38
38
  type: z.literal('video'),
39
39
  url: z.string().nullable(),
40
40
  parameters: z.string(),
41
+ saveToSdCard: z.boolean(),
41
42
  }),
42
43
  z.object({
43
44
  type: z.literal('images'),
@@ -1,53 +1,75 @@
1
1
  import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
+ export const streamPlatforms = {
4
+ da_cast: 'da_cast',
5
+ dailymotion: 'dailymotion',
6
+ facebook_rtmp: 'facebook_rtmp',
7
+ game_changer: 'game_changer',
8
+ hls_pull: 'hls_pull',
9
+ hls_push: 'hls_push',
10
+ ibm: 'ibm',
11
+ mpeg_dvb: 'mpeg_dvb',
12
+ microsoft_azure: 'microsoft_azure',
13
+ microsoft_stream: 'microsoft_stream',
14
+ rtmp: 'rtmp',
15
+ sd_card: 'sd_card',
16
+ srt: 'srt',
17
+ twitch: 'twitch',
18
+ vimeo: 'vimeo',
19
+ wowza: 'wowza',
20
+ youtube_rtmp: 'youtube_rtmp',
21
+ windy: 'windy',
22
+ youtube: 'youtube',
23
+ facebook: 'facebook',
24
+ };
3
25
  export const daCastSchema = streamCommonSchema.extend({
4
- platform: z.literal('da_cast'),
26
+ platform: z.literal(streamPlatforms.da_cast),
5
27
  });
6
28
  export const dailymotionSchema = streamCommonSchema.extend({
7
- platform: z.literal('dailymotion'),
29
+ platform: z.literal(streamPlatforms.dailymotion),
8
30
  });
9
31
  export const facebookRtmpSchema = streamCommonSchema.extend({
10
- platform: z.literal('facebook_rtmp'),
32
+ platform: z.literal(streamPlatforms.facebook_rtmp),
11
33
  });
12
34
  export const gameChangerSchema = streamCommonSchema.extend({
13
- platform: z.literal('game_changer'),
35
+ platform: z.literal(streamPlatforms.game_changer),
14
36
  });
15
37
  export const hlsPullSchema = streamCommonSchema.extend({
16
- platform: z.literal('hls_pull'),
38
+ platform: z.literal(streamPlatforms.hls_pull),
17
39
  });
18
40
  export const hlsPushSchema = streamCommonSchema.extend({
19
- platform: z.literal('hls_push'),
41
+ platform: z.literal(streamPlatforms.hls_push),
20
42
  });
21
43
  export const ibmSchema = streamCommonSchema.extend({
22
- platform: z.literal('ibm'),
44
+ platform: z.literal(streamPlatforms.ibm),
23
45
  });
24
46
  export const mpegDvbSchema = streamCommonSchema.extend({
25
- platform: z.literal('mpeg_dvb'),
47
+ platform: z.literal(streamPlatforms.mpeg_dvb),
26
48
  });
27
49
  export const microsoftAzureSchema = streamCommonSchema.extend({
28
- platform: z.literal('microsoft_azure'),
50
+ platform: z.literal(streamPlatforms.microsoft_azure),
29
51
  });
30
52
  export const microsoftStreamSchema = streamCommonSchema.extend({
31
- platform: z.literal('microsoft_stream'),
53
+ platform: z.literal(streamPlatforms.microsoft_stream),
32
54
  });
33
55
  export const rtmpSchema = streamCommonSchema.extend({
34
- platform: z.literal('rtmp'),
56
+ platform: z.literal(streamPlatforms.rtmp),
35
57
  });
36
58
  export const sdCardSchema = streamCommonSchema.extend({
37
- platform: z.literal('sd_card'),
59
+ platform: z.literal(streamPlatforms.sd_card),
38
60
  });
39
61
  export const srtSchema = streamCommonSchema.extend({
40
- platform: z.literal('srt'),
62
+ platform: z.literal(streamPlatforms.srt),
41
63
  });
42
64
  export const twitchSchema = streamCommonSchema.extend({
43
- platform: z.literal('twitch'),
65
+ platform: z.literal(streamPlatforms.twitch),
44
66
  });
45
67
  export const vimeoSchema = streamCommonSchema.extend({
46
- platform: z.literal('vimeo'),
68
+ platform: z.literal(streamPlatforms.vimeo),
47
69
  });
48
70
  export const wowzaSchema = streamCommonSchema.extend({
49
- platform: z.literal('wowza'),
71
+ platform: z.literal(streamPlatforms.wowza),
50
72
  });
51
73
  export const youtubeRtmpSchema = streamCommonSchema.extend({
52
- platform: z.literal('youtube_rtmp'),
74
+ platform: z.literal(streamPlatforms.youtube_rtmp),
53
75
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.135",
3
+ "version": "4.0.0-beta.137",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {