camstreamerlib 4.0.0-beta.87 → 4.0.0-beta.89

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.
@@ -134,6 +134,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
134
134
  isActive: boolean;
135
135
  }[];
136
136
  };
137
+ rtmpUrl: string;
138
+ streamKey: string;
139
+ streamIdentifier?: string | undefined;
137
140
  } | {
138
141
  type: "sd_card";
139
142
  enabled: boolean;
@@ -341,6 +344,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
341
344
  isActive: boolean;
342
345
  }[];
343
346
  };
347
+ rtmpUrl: string;
348
+ streamKey: string;
349
+ streamIdentifier?: string | undefined;
344
350
  } | {
345
351
  type: "sd_card";
346
352
  enabled: boolean;
@@ -616,6 +616,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
616
616
  }>]>;
617
617
  } & {
618
618
  type: z.ZodLiteral<"rtmp">;
619
+ rtmpUrl: z.ZodString;
620
+ streamKey: z.ZodString;
621
+ streamIdentifier: z.ZodOptional<z.ZodString>;
619
622
  }, "strip", z.ZodTypeAny, {
620
623
  type: "rtmp";
621
624
  enabled: boolean;
@@ -643,6 +646,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
643
646
  isActive: boolean;
644
647
  }[];
645
648
  };
649
+ rtmpUrl: string;
650
+ streamKey: string;
651
+ streamIdentifier?: string | undefined;
646
652
  }, {
647
653
  type: "rtmp";
648
654
  enabled: boolean;
@@ -670,6 +676,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
670
676
  isActive: boolean;
671
677
  }[];
672
678
  };
679
+ rtmpUrl: string;
680
+ streamKey: string;
681
+ streamIdentifier?: string | undefined;
673
682
  }>, z.ZodObject<{
674
683
  id: z.ZodNumber;
675
684
  enabled: z.ZodBoolean;
@@ -1745,6 +1754,9 @@ export declare const streamListSchema: z.ZodObject<{
1745
1754
  }>]>;
1746
1755
  } & {
1747
1756
  type: z.ZodLiteral<"rtmp">;
1757
+ rtmpUrl: z.ZodString;
1758
+ streamKey: z.ZodString;
1759
+ streamIdentifier: z.ZodOptional<z.ZodString>;
1748
1760
  }, "strip", z.ZodTypeAny, {
1749
1761
  type: "rtmp";
1750
1762
  enabled: boolean;
@@ -1772,6 +1784,9 @@ export declare const streamListSchema: z.ZodObject<{
1772
1784
  isActive: boolean;
1773
1785
  }[];
1774
1786
  };
1787
+ rtmpUrl: string;
1788
+ streamKey: string;
1789
+ streamIdentifier?: string | undefined;
1775
1790
  }, {
1776
1791
  type: "rtmp";
1777
1792
  enabled: boolean;
@@ -1799,6 +1814,9 @@ export declare const streamListSchema: z.ZodObject<{
1799
1814
  isActive: boolean;
1800
1815
  }[];
1801
1816
  };
1817
+ rtmpUrl: string;
1818
+ streamKey: string;
1819
+ streamIdentifier?: string | undefined;
1802
1820
  }>, z.ZodObject<{
1803
1821
  id: z.ZodNumber;
1804
1822
  enabled: z.ZodBoolean;
@@ -2387,6 +2405,9 @@ export declare const streamListSchema: z.ZodObject<{
2387
2405
  isActive: boolean;
2388
2406
  }[];
2389
2407
  };
2408
+ rtmpUrl: string;
2409
+ streamKey: string;
2410
+ streamIdentifier?: string | undefined;
2390
2411
  } | {
2391
2412
  type: "sd_card";
2392
2413
  enabled: boolean;
@@ -2594,6 +2615,9 @@ export declare const streamListSchema: z.ZodObject<{
2594
2615
  isActive: boolean;
2595
2616
  }[];
2596
2617
  };
2618
+ rtmpUrl: string;
2619
+ streamKey: string;
2620
+ streamIdentifier?: string | undefined;
2597
2621
  } | {
2598
2622
  type: "sd_card";
2599
2623
  enabled: boolean;
@@ -2809,6 +2833,9 @@ export declare const isRtmpStream: (stream: TStream) => stream is {
2809
2833
  isActive: boolean;
2810
2834
  }[];
2811
2835
  };
2836
+ rtmpUrl: string;
2837
+ streamKey: string;
2838
+ streamIdentifier?: string | undefined;
2812
2839
  };
2813
2840
  export type TSdCardStream = z.infer<typeof sdCardSchema>;
2814
2841
  export declare const isSdCardStream: (stream: TStream) => stream is {
@@ -2952,34 +2979,36 @@ export declare const audioFileListSchema: z.ZodArray<z.ZodObject<{
2952
2979
  storage: "url" | "flash" | "SD0";
2953
2980
  }>, "many">;
2954
2981
  export type TAudioFileList = z.infer<typeof audioFileListSchema>;
2955
- export declare const audioFileDataSchema: z.ZodObject<{
2956
- code: z.ZodNumber;
2957
- list: z.ZodArray<z.ZodObject<{
2958
- name: z.ZodString;
2959
- path: z.ZodString;
2960
- storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"url">]>;
2961
- }, "strip", z.ZodTypeAny, {
2962
- path: string;
2963
- name: string;
2964
- storage: "url" | "flash" | "SD0";
2965
- }, {
2966
- path: string;
2967
- name: string;
2968
- storage: "url" | "flash" | "SD0";
2969
- }>, "many">;
2982
+ export type TFileToUpload = {
2983
+ storage: TAudioFileStorageType;
2984
+ name: string;
2985
+ file: File | string | null;
2986
+ };
2987
+ export declare const audioUrlSchema: z.ZodObject<{
2988
+ fileUrl: z.ZodString;
2989
+ name: z.ZodString;
2990
+ storage: z.ZodLiteral<"url">;
2970
2991
  }, "strip", z.ZodTypeAny, {
2971
- code: number;
2972
- list: {
2973
- path: string;
2974
- name: string;
2975
- storage: "url" | "flash" | "SD0";
2976
- }[];
2992
+ name: string;
2993
+ storage: "url";
2994
+ fileUrl: string;
2977
2995
  }, {
2978
- code: number;
2979
- list: {
2980
- path: string;
2981
- name: string;
2982
- storage: "url" | "flash" | "SD0";
2983
- }[];
2996
+ name: string;
2997
+ storage: "url";
2998
+ fileUrl: string;
2999
+ }>;
3000
+ export type TAudioUrlType = z.infer<typeof audioUrlSchema>;
3001
+ export declare const audioLocalSchema: z.ZodObject<{
3002
+ file: z.ZodType<File, z.ZodTypeDef, File>;
3003
+ name: z.ZodString;
3004
+ storage: z.ZodEnum<["flash", "SD0"]>;
3005
+ }, "strip", z.ZodTypeAny, {
3006
+ name: string;
3007
+ storage: "flash" | "SD0";
3008
+ file: File;
3009
+ }, {
3010
+ name: string;
3011
+ storage: "flash" | "SD0";
3012
+ file: File;
2984
3013
  }>;
2985
- export type TAudioFileData = z.infer<typeof audioFileDataSchema>;
3014
+ export type TAudioLocalType = z.infer<typeof audioLocalSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.audioFileDataSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isYouTubeStream = exports.isWindyStream = exports.isSdCardStream = exports.isRtmpStream = exports.isMpegDvbStream = exports.isHlsStream = exports.isFacebookStream = exports.streamListSchema = exports.streamSchema = void 0;
3
+ exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isYouTubeStream = exports.isWindyStream = exports.isSdCardStream = exports.isRtmpStream = exports.isMpegDvbStream = exports.isHlsStream = 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 hlsSchema_1 = require("./hlsSchema");
@@ -69,7 +69,13 @@ exports.audioFileSchema = zod_1.z.object({
69
69
  storage: exports.audioFileStorageTypeSchema,
70
70
  });
71
71
  exports.audioFileListSchema = zod_1.z.array(exports.audioFileSchema);
72
- exports.audioFileDataSchema = zod_1.z.object({
73
- code: zod_1.z.number(),
74
- list: exports.audioFileListSchema,
72
+ exports.audioUrlSchema = zod_1.z.object({
73
+ fileUrl: zod_1.z.string(),
74
+ name: zod_1.z.string(),
75
+ storage: zod_1.z.literal('url'),
76
+ });
77
+ exports.audioLocalSchema = zod_1.z.object({
78
+ file: zod_1.z.instanceof(File),
79
+ name: zod_1.z.string(),
80
+ storage: zod_1.z.enum(['flash', 'SD0']),
75
81
  });
@@ -99,6 +99,9 @@ export declare const rtmpSchema: z.ZodObject<{
99
99
  }>]>;
100
100
  } & {
101
101
  type: z.ZodLiteral<"rtmp">;
102
+ rtmpUrl: z.ZodString;
103
+ streamKey: z.ZodString;
104
+ streamIdentifier: z.ZodOptional<z.ZodString>;
102
105
  }, "strip", z.ZodTypeAny, {
103
106
  type: "rtmp";
104
107
  enabled: boolean;
@@ -126,6 +129,9 @@ export declare const rtmpSchema: z.ZodObject<{
126
129
  isActive: boolean;
127
130
  }[];
128
131
  };
132
+ rtmpUrl: string;
133
+ streamKey: string;
134
+ streamIdentifier?: string | undefined;
129
135
  }, {
130
136
  type: "rtmp";
131
137
  enabled: boolean;
@@ -153,4 +159,7 @@ export declare const rtmpSchema: z.ZodObject<{
153
159
  isActive: boolean;
154
160
  }[];
155
161
  };
162
+ rtmpUrl: string;
163
+ streamKey: string;
164
+ streamIdentifier?: string | undefined;
156
165
  }>;
@@ -8,4 +8,7 @@ const zod_1 = __importDefault(require("zod"));
8
8
  const streamCommonTypes_1 = require("./streamCommonTypes");
9
9
  exports.rtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
10
  type: zod_1.default.literal('rtmp'),
11
+ rtmpUrl: zod_1.default.string().url(),
12
+ streamKey: zod_1.default.string(),
13
+ streamIdentifier: zod_1.default.string().optional(),
11
14
  });
@@ -59,7 +59,13 @@ export const audioFileSchema = z.object({
59
59
  storage: audioFileStorageTypeSchema,
60
60
  });
61
61
  export const audioFileListSchema = z.array(audioFileSchema);
62
- export const audioFileDataSchema = z.object({
63
- code: z.number(),
64
- 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']),
65
71
  });
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.87",
3
+ "version": "4.0.0-beta.89",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -134,6 +134,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
134
134
  isActive: boolean;
135
135
  }[];
136
136
  };
137
+ rtmpUrl: string;
138
+ streamKey: string;
139
+ streamIdentifier?: string | undefined;
137
140
  } | {
138
141
  type: "sd_card";
139
142
  enabled: boolean;
@@ -341,6 +344,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
341
344
  isActive: boolean;
342
345
  }[];
343
346
  };
347
+ rtmpUrl: string;
348
+ streamKey: string;
349
+ streamIdentifier?: string | undefined;
344
350
  } | {
345
351
  type: "sd_card";
346
352
  enabled: boolean;
@@ -616,6 +616,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
616
616
  }>]>;
617
617
  } & {
618
618
  type: z.ZodLiteral<"rtmp">;
619
+ rtmpUrl: z.ZodString;
620
+ streamKey: z.ZodString;
621
+ streamIdentifier: z.ZodOptional<z.ZodString>;
619
622
  }, "strip", z.ZodTypeAny, {
620
623
  type: "rtmp";
621
624
  enabled: boolean;
@@ -643,6 +646,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
643
646
  isActive: boolean;
644
647
  }[];
645
648
  };
649
+ rtmpUrl: string;
650
+ streamKey: string;
651
+ streamIdentifier?: string | undefined;
646
652
  }, {
647
653
  type: "rtmp";
648
654
  enabled: boolean;
@@ -670,6 +676,9 @@ export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
670
676
  isActive: boolean;
671
677
  }[];
672
678
  };
679
+ rtmpUrl: string;
680
+ streamKey: string;
681
+ streamIdentifier?: string | undefined;
673
682
  }>, z.ZodObject<{
674
683
  id: z.ZodNumber;
675
684
  enabled: z.ZodBoolean;
@@ -1745,6 +1754,9 @@ export declare const streamListSchema: z.ZodObject<{
1745
1754
  }>]>;
1746
1755
  } & {
1747
1756
  type: z.ZodLiteral<"rtmp">;
1757
+ rtmpUrl: z.ZodString;
1758
+ streamKey: z.ZodString;
1759
+ streamIdentifier: z.ZodOptional<z.ZodString>;
1748
1760
  }, "strip", z.ZodTypeAny, {
1749
1761
  type: "rtmp";
1750
1762
  enabled: boolean;
@@ -1772,6 +1784,9 @@ export declare const streamListSchema: z.ZodObject<{
1772
1784
  isActive: boolean;
1773
1785
  }[];
1774
1786
  };
1787
+ rtmpUrl: string;
1788
+ streamKey: string;
1789
+ streamIdentifier?: string | undefined;
1775
1790
  }, {
1776
1791
  type: "rtmp";
1777
1792
  enabled: boolean;
@@ -1799,6 +1814,9 @@ export declare const streamListSchema: z.ZodObject<{
1799
1814
  isActive: boolean;
1800
1815
  }[];
1801
1816
  };
1817
+ rtmpUrl: string;
1818
+ streamKey: string;
1819
+ streamIdentifier?: string | undefined;
1802
1820
  }>, z.ZodObject<{
1803
1821
  id: z.ZodNumber;
1804
1822
  enabled: z.ZodBoolean;
@@ -2387,6 +2405,9 @@ export declare const streamListSchema: z.ZodObject<{
2387
2405
  isActive: boolean;
2388
2406
  }[];
2389
2407
  };
2408
+ rtmpUrl: string;
2409
+ streamKey: string;
2410
+ streamIdentifier?: string | undefined;
2390
2411
  } | {
2391
2412
  type: "sd_card";
2392
2413
  enabled: boolean;
@@ -2594,6 +2615,9 @@ export declare const streamListSchema: z.ZodObject<{
2594
2615
  isActive: boolean;
2595
2616
  }[];
2596
2617
  };
2618
+ rtmpUrl: string;
2619
+ streamKey: string;
2620
+ streamIdentifier?: string | undefined;
2597
2621
  } | {
2598
2622
  type: "sd_card";
2599
2623
  enabled: boolean;
@@ -2809,6 +2833,9 @@ export declare const isRtmpStream: (stream: TStream) => stream is {
2809
2833
  isActive: boolean;
2810
2834
  }[];
2811
2835
  };
2836
+ rtmpUrl: string;
2837
+ streamKey: string;
2838
+ streamIdentifier?: string | undefined;
2812
2839
  };
2813
2840
  export type TSdCardStream = z.infer<typeof sdCardSchema>;
2814
2841
  export declare const isSdCardStream: (stream: TStream) => stream is {
@@ -2952,34 +2979,36 @@ export declare const audioFileListSchema: z.ZodArray<z.ZodObject<{
2952
2979
  storage: "url" | "flash" | "SD0";
2953
2980
  }>, "many">;
2954
2981
  export type TAudioFileList = z.infer<typeof audioFileListSchema>;
2955
- export declare const audioFileDataSchema: z.ZodObject<{
2956
- code: z.ZodNumber;
2957
- list: z.ZodArray<z.ZodObject<{
2958
- name: z.ZodString;
2959
- path: z.ZodString;
2960
- storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"url">]>;
2961
- }, "strip", z.ZodTypeAny, {
2962
- path: string;
2963
- name: string;
2964
- storage: "url" | "flash" | "SD0";
2965
- }, {
2966
- path: string;
2967
- name: string;
2968
- storage: "url" | "flash" | "SD0";
2969
- }>, "many">;
2982
+ export type TFileToUpload = {
2983
+ storage: TAudioFileStorageType;
2984
+ name: string;
2985
+ file: File | string | null;
2986
+ };
2987
+ export declare const audioUrlSchema: z.ZodObject<{
2988
+ fileUrl: z.ZodString;
2989
+ name: z.ZodString;
2990
+ storage: z.ZodLiteral<"url">;
2970
2991
  }, "strip", z.ZodTypeAny, {
2971
- code: number;
2972
- list: {
2973
- path: string;
2974
- name: string;
2975
- storage: "url" | "flash" | "SD0";
2976
- }[];
2992
+ name: string;
2993
+ storage: "url";
2994
+ fileUrl: string;
2977
2995
  }, {
2978
- code: number;
2979
- list: {
2980
- path: string;
2981
- name: string;
2982
- storage: "url" | "flash" | "SD0";
2983
- }[];
2996
+ name: string;
2997
+ storage: "url";
2998
+ fileUrl: string;
2999
+ }>;
3000
+ export type TAudioUrlType = z.infer<typeof audioUrlSchema>;
3001
+ export declare const audioLocalSchema: z.ZodObject<{
3002
+ file: z.ZodType<File, z.ZodTypeDef, File>;
3003
+ name: z.ZodString;
3004
+ storage: z.ZodEnum<["flash", "SD0"]>;
3005
+ }, "strip", z.ZodTypeAny, {
3006
+ name: string;
3007
+ storage: "flash" | "SD0";
3008
+ file: File;
3009
+ }, {
3010
+ name: string;
3011
+ storage: "flash" | "SD0";
3012
+ file: File;
2984
3013
  }>;
2985
- export type TAudioFileData = z.infer<typeof audioFileDataSchema>;
3014
+ export type TAudioLocalType = z.infer<typeof audioLocalSchema>;
@@ -99,6 +99,9 @@ export declare const rtmpSchema: z.ZodObject<{
99
99
  }>]>;
100
100
  } & {
101
101
  type: z.ZodLiteral<"rtmp">;
102
+ rtmpUrl: z.ZodString;
103
+ streamKey: z.ZodString;
104
+ streamIdentifier: z.ZodOptional<z.ZodString>;
102
105
  }, "strip", z.ZodTypeAny, {
103
106
  type: "rtmp";
104
107
  enabled: boolean;
@@ -126,6 +129,9 @@ export declare const rtmpSchema: z.ZodObject<{
126
129
  isActive: boolean;
127
130
  }[];
128
131
  };
132
+ rtmpUrl: string;
133
+ streamKey: string;
134
+ streamIdentifier?: string | undefined;
129
135
  }, {
130
136
  type: "rtmp";
131
137
  enabled: boolean;
@@ -153,4 +159,7 @@ export declare const rtmpSchema: z.ZodObject<{
153
159
  isActive: boolean;
154
160
  }[];
155
161
  };
162
+ rtmpUrl: string;
163
+ streamKey: string;
164
+ streamIdentifier?: string | undefined;
156
165
  }>;