camstreamerlib 4.0.0-beta.93 → 4.0.0-beta.94

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.
@@ -0,0 +1,202 @@
1
+ import z from 'zod';
2
+ export declare const gameChangerSchema: 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<"game_changer">;
128
+ }, "strip", z.ZodTypeAny, {
129
+ type: "game_changer";
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: "game_changer";
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.gameChangerSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const streamCommonTypes_1 = require("./streamCommonTypes");
9
+ exports.gameChangerSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
+ type: zod_1.default.literal('game_changer'),
11
+ });
@@ -1,5 +1,5 @@
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">]>;
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
3
  export type TStreamType = z.infer<typeof streamTypeSchema>;
4
4
  declare const scheduleSchema: z.ZodObject<{
5
5
  start: z.ZodObject<{
@@ -21,6 +21,7 @@ exports.streamTypeSchema = zod_1.z.union([
21
21
  zod_1.z.literal('church'),
22
22
  zod_1.z.literal('srt'),
23
23
  zod_1.z.literal('da_cast'),
24
+ zod_1.z.literal('game_changer'),
24
25
  ]);
25
26
  const scheduleSchema = zod_1.z.object({
26
27
  start: zod_1.z.object({
@@ -17,6 +17,7 @@ import { dailymotionSchema } from './dailymotionSchema';
17
17
  import { ibmSchema } from './ibmSchema';
18
18
  import { microsoftAzureSchema } from './microsoftAzureSchema';
19
19
  import { microsoftStreamSchema } from './microsoftStreamSchema';
20
+ import { gameChangerSchema } from './gameChangerSchema';
20
21
  export const streamSchema = z.discriminatedUnion('type', [
21
22
  facebookSchema,
22
23
  mpegDvbSchema,
@@ -36,6 +37,7 @@ export const streamSchema = z.discriminatedUnion('type', [
36
37
  ibmSchema,
37
38
  microsoftAzureSchema,
38
39
  microsoftStreamSchema,
40
+ gameChangerSchema,
39
41
  ]);
40
42
  export const streamListSchema = z.object({ streamList: z.array(streamSchema) });
41
43
  export const isFacebookStream = (stream) => {
@@ -92,6 +94,9 @@ export const isMicrosoftAzureStream = (stream) => {
92
94
  export const isMicrosoftStream = (stream) => {
93
95
  return stream.type === 'microsoft_stream';
94
96
  };
97
+ export const isGameChangerStream = (stream) => {
98
+ return stream.type === 'game_changer';
99
+ };
95
100
  export var AudioType;
96
101
  (function (AudioType) {
97
102
  AudioType[AudioType["MP3"] = 0] = "MP3";
@@ -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
+ });
@@ -18,6 +18,7 @@ export const streamTypeSchema = z.union([
18
18
  z.literal('church'),
19
19
  z.literal('srt'),
20
20
  z.literal('da_cast'),
21
+ z.literal('game_changer'),
21
22
  ]);
22
23
  const scheduleSchema = z.object({
23
24
  start: z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.93",
3
+ "version": "4.0.0-beta.94",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -692,6 +692,43 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
692
692
  videobitrate?: number | undefined;
693
693
  videomaxbitrate?: number | undefined;
694
694
  };
695
+ } | {
696
+ type: "game_changer";
697
+ enabled: boolean;
698
+ id: number;
699
+ active: boolean;
700
+ title: string;
701
+ trigger: {
702
+ type: "manual";
703
+ ioPort: string | null;
704
+ } | {
705
+ type: "onetime";
706
+ startTime: number;
707
+ stopTime: number;
708
+ } | {
709
+ type: "recurrent";
710
+ schedule: {
711
+ start: {
712
+ day: number;
713
+ timeS: number;
714
+ };
715
+ stop: {
716
+ day: number;
717
+ timeS: number;
718
+ };
719
+ isActive: boolean;
720
+ }[];
721
+ };
722
+ inputType: "RTSP_URL" | "CSw" | "CRS";
723
+ internalVapixParameters: {
724
+ camera: string;
725
+ resolution?: string | undefined;
726
+ compression?: number | undefined;
727
+ audio?: 0 | 1 | undefined;
728
+ fps?: number | undefined;
729
+ videobitrate?: number | undefined;
730
+ videomaxbitrate?: number | undefined;
731
+ };
695
732
  })[]>;
696
733
  setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
697
734
  getStream(streamId: number, options?: THttpRequestOptions): Promise<{
@@ -1376,6 +1413,43 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1376
1413
  videobitrate?: number | undefined;
1377
1414
  videomaxbitrate?: number | undefined;
1378
1415
  };
1416
+ } | {
1417
+ type: "game_changer";
1418
+ enabled: boolean;
1419
+ id: number;
1420
+ active: boolean;
1421
+ title: string;
1422
+ trigger: {
1423
+ type: "manual";
1424
+ ioPort: string | null;
1425
+ } | {
1426
+ type: "onetime";
1427
+ startTime: number;
1428
+ stopTime: number;
1429
+ } | {
1430
+ type: "recurrent";
1431
+ schedule: {
1432
+ start: {
1433
+ day: number;
1434
+ timeS: number;
1435
+ };
1436
+ stop: {
1437
+ day: number;
1438
+ timeS: number;
1439
+ };
1440
+ isActive: boolean;
1441
+ }[];
1442
+ };
1443
+ inputType: "RTSP_URL" | "CSw" | "CRS";
1444
+ internalVapixParameters: {
1445
+ camera: string;
1446
+ resolution?: string | undefined;
1447
+ compression?: number | undefined;
1448
+ audio?: 0 | 1 | undefined;
1449
+ fps?: number | undefined;
1450
+ videobitrate?: number | undefined;
1451
+ videomaxbitrate?: number | undefined;
1452
+ };
1379
1453
  }>;
1380
1454
  setStream(streamId: number, streamData: Partial<TStream>, options?: THttpRequestOptions): Promise<void>;
1381
1455
  isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;