camstreamerlib 4.0.36-05711a0 → 4.0.36-c07c9c1
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.
- package/cjs/CamSwitcherAPI.d.ts +1 -0
- package/cjs/CamSwitcherAPI.js +2 -0
- package/cjs/PlaneTrackerAPI.d.ts +0 -3
- package/cjs/types/CamSwitcherAPI.d.ts +3 -0
- package/cjs/types/CamSwitcherAPI.js +1 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +0 -18
- package/cjs/types/PlaneTrackerAPI.js +1 -11
- package/cjs/types/PlaneTrackerAPI.test.js +0 -27
- package/esm/CamSwitcherAPI.js +2 -0
- package/esm/types/CamSwitcherAPI.js +1 -0
- package/esm/types/PlaneTrackerAPI.js +1 -11
- package/esm/types/PlaneTrackerAPI.test.js +0 -27
- package/package.json +1 -1
- package/types/CamSwitcherAPI.d.ts +1 -0
- package/types/PlaneTrackerAPI.d.ts +0 -3
- package/types/types/CamSwitcherAPI.d.ts +3 -0
- package/types/types/PlaneTrackerAPI.d.ts +0 -18
package/cjs/CamSwitcherAPI.d.ts
CHANGED
|
@@ -161,6 +161,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
161
161
|
bitrateVapixParams?: string | null | undefined;
|
|
162
162
|
audioSampleRate?: number | undefined;
|
|
163
163
|
audioChannelCount?: 1 | 2 | undefined;
|
|
164
|
+
audioBitrate?: number | undefined;
|
|
164
165
|
} | undefined>;
|
|
165
166
|
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
166
167
|
type: "source" | "fromSource";
|
package/cjs/CamSwitcherAPI.js
CHANGED
|
@@ -156,6 +156,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
156
156
|
audio: {
|
|
157
157
|
sampleRate: data.audioSampleRate,
|
|
158
158
|
channelCount: data.audioChannelCount,
|
|
159
|
+
bitrate: data.audioBitrate,
|
|
159
160
|
},
|
|
160
161
|
keyboard: data.keyboard,
|
|
161
162
|
};
|
|
@@ -207,6 +208,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
207
208
|
const settings = {
|
|
208
209
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
209
210
|
audioChannelCount: saveData.audio?.channelCount,
|
|
211
|
+
audioBitrate: saveData.audio?.bitrate,
|
|
210
212
|
keyboard: saveData.keyboard,
|
|
211
213
|
fps: saveData.video.fps,
|
|
212
214
|
resolution: saveData.video.resolution,
|
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -87,7 +87,6 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
87
87
|
widget: {
|
|
88
88
|
enabled: boolean;
|
|
89
89
|
scale: number;
|
|
90
|
-
units: "rotate" | "metric" | "imperial";
|
|
91
90
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
92
91
|
posX: number;
|
|
93
92
|
posY: number;
|
|
@@ -101,8 +100,6 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
101
100
|
posY: number;
|
|
102
101
|
showWeather: boolean;
|
|
103
102
|
weatherLocationKey: string;
|
|
104
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
105
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
106
103
|
};
|
|
107
104
|
fr24FlightInfoSource: {
|
|
108
105
|
enabled: boolean;
|
|
@@ -785,6 +785,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
785
785
|
bitrateVapixParams: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
786
|
audioSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
787
787
|
audioChannelCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
788
|
+
audioBitrate: z.ZodOptional<z.ZodNumber>;
|
|
788
789
|
keyboard: z.ZodOptional<z.ZodObject<{
|
|
789
790
|
fromSource: z.ZodNullable<z.ZodString>;
|
|
790
791
|
none: z.ZodNullable<z.ZodString>;
|
|
@@ -812,6 +813,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
812
813
|
bitrateVapixParams?: string | null | undefined;
|
|
813
814
|
audioSampleRate?: number | undefined;
|
|
814
815
|
audioChannelCount?: 1 | 2 | undefined;
|
|
816
|
+
audioBitrate?: number | undefined;
|
|
815
817
|
}, {
|
|
816
818
|
resolution?: string | undefined;
|
|
817
819
|
compression?: number | undefined;
|
|
@@ -829,6 +831,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
829
831
|
bitrateVapixParams?: string | null | undefined;
|
|
830
832
|
audioSampleRate?: number | undefined;
|
|
831
833
|
audioChannelCount?: 1 | 2 | undefined;
|
|
834
|
+
audioBitrate?: number | undefined;
|
|
832
835
|
}>;
|
|
833
836
|
export type TCameraOptions = z.infer<typeof cameraOptionsSchema>;
|
|
834
837
|
export declare const globalAudioSettingsTypeSchema: z.ZodUnion<[z.ZodLiteral<"fromSource">, z.ZodLiteral<"source">]>;
|
|
@@ -145,6 +145,7 @@ exports.cameraOptionsSchema = common_1.bitrateVapixParamsSchema
|
|
|
145
145
|
bitrateVapixParams: zod_1.z.string().nullable(),
|
|
146
146
|
audioSampleRate: zod_1.z.number(),
|
|
147
147
|
audioChannelCount: common_1.audioChannelCountSchema,
|
|
148
|
+
audioBitrate: zod_1.z.number().int().nonnegative(),
|
|
148
149
|
keyboard: zod_1.z.object({
|
|
149
150
|
fromSource: common_1.keyboardShortcutSchema,
|
|
150
151
|
none: common_1.keyboardShortcutSchema,
|
|
@@ -54,8 +54,6 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
54
54
|
posY: number;
|
|
55
55
|
enabled?: boolean | undefined;
|
|
56
56
|
}>;
|
|
57
|
-
declare const widgetUnitsSchema: z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>;
|
|
58
|
-
export type TWidgetUnits = z.infer<typeof widgetUnitsSchema>;
|
|
59
57
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
60
58
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
61
59
|
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
@@ -315,12 +313,9 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
315
313
|
posX: z.ZodNumber;
|
|
316
314
|
posY: z.ZodNumber;
|
|
317
315
|
scale: z.ZodNumber;
|
|
318
|
-
} & {
|
|
319
|
-
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
320
316
|
}, "strip", z.ZodTypeAny, {
|
|
321
317
|
enabled: boolean;
|
|
322
318
|
scale: number;
|
|
323
|
-
units: "rotate" | "metric" | "imperial";
|
|
324
319
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
325
320
|
posX: number;
|
|
326
321
|
posY: number;
|
|
@@ -330,7 +325,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
330
325
|
posX: number;
|
|
331
326
|
posY: number;
|
|
332
327
|
enabled?: boolean | undefined;
|
|
333
|
-
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
334
328
|
}>>;
|
|
335
329
|
airportWidget: z.ZodDefault<z.ZodObject<{
|
|
336
330
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -342,8 +336,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
342
336
|
showWeather: z.ZodDefault<z.ZodBoolean>;
|
|
343
337
|
weatherLocationKey: z.ZodDefault<z.ZodString>;
|
|
344
338
|
weatherLocationName: z.ZodDefault<z.ZodString>;
|
|
345
|
-
windSpeedUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
346
|
-
temperatureUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
347
339
|
}, "strip", z.ZodTypeAny, {
|
|
348
340
|
enabled: boolean;
|
|
349
341
|
scale: number;
|
|
@@ -353,8 +345,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
353
345
|
posY: number;
|
|
354
346
|
showWeather: boolean;
|
|
355
347
|
weatherLocationKey: string;
|
|
356
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
357
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
358
348
|
}, {
|
|
359
349
|
scale: number;
|
|
360
350
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
@@ -364,8 +354,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
364
354
|
weatherLocationName?: string | undefined;
|
|
365
355
|
showWeather?: boolean | undefined;
|
|
366
356
|
weatherLocationKey?: string | undefined;
|
|
367
|
-
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
368
|
-
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
369
357
|
}>>;
|
|
370
358
|
fr24FlightInfoSource: z.ZodDefault<z.ZodObject<{
|
|
371
359
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -626,7 +614,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
626
614
|
widget: {
|
|
627
615
|
enabled: boolean;
|
|
628
616
|
scale: number;
|
|
629
|
-
units: "rotate" | "metric" | "imperial";
|
|
630
617
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
631
618
|
posX: number;
|
|
632
619
|
posY: number;
|
|
@@ -640,8 +627,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
640
627
|
posY: number;
|
|
641
628
|
showWeather: boolean;
|
|
642
629
|
weatherLocationKey: string;
|
|
643
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
644
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
645
630
|
};
|
|
646
631
|
fr24FlightInfoSource: {
|
|
647
632
|
enabled: boolean;
|
|
@@ -817,7 +802,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
817
802
|
posX: number;
|
|
818
803
|
posY: number;
|
|
819
804
|
enabled?: boolean | undefined;
|
|
820
|
-
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
821
805
|
} | undefined;
|
|
822
806
|
airportWidget?: {
|
|
823
807
|
scale: number;
|
|
@@ -828,8 +812,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
828
812
|
weatherLocationName?: string | undefined;
|
|
829
813
|
showWeather?: boolean | undefined;
|
|
830
814
|
weatherLocationKey?: string | undefined;
|
|
831
|
-
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
832
|
-
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
833
815
|
} | undefined;
|
|
834
816
|
fr24FlightInfoSource?: {
|
|
835
817
|
enabled?: boolean | undefined;
|
|
@@ -28,7 +28,6 @@ exports.widgetSchema = zod_1.z.object({
|
|
|
28
28
|
posY: zod_1.z.number().nonnegative(),
|
|
29
29
|
scale: zod_1.z.number().positive(),
|
|
30
30
|
});
|
|
31
|
-
const widgetUnitsSchema = zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial'), zod_1.z.literal('rotate')]);
|
|
32
31
|
const labelOptionsSchema = zod_1.z.union([
|
|
33
32
|
zod_1.z.literal('blank'),
|
|
34
33
|
zod_1.z.literal('registration'),
|
|
@@ -190,25 +189,18 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
190
189
|
displaySystemInfo: zod_1.z.boolean().optional(),
|
|
191
190
|
})
|
|
192
191
|
.optional(),
|
|
193
|
-
widget: exports.widgetSchema
|
|
194
|
-
.extend({
|
|
195
|
-
units: widgetUnitsSchema.default('rotate'),
|
|
196
|
-
})
|
|
197
|
-
.default({
|
|
192
|
+
widget: exports.widgetSchema.default({
|
|
198
193
|
enabled: true,
|
|
199
194
|
coord: 'top_right',
|
|
200
195
|
posX: 10,
|
|
201
196
|
posY: 10,
|
|
202
197
|
scale: 100,
|
|
203
|
-
units: 'rotate',
|
|
204
198
|
}),
|
|
205
199
|
airportWidget: exports.widgetSchema
|
|
206
200
|
.extend({
|
|
207
201
|
showWeather: zod_1.z.boolean().default(false),
|
|
208
202
|
weatherLocationKey: zod_1.z.string().default(''),
|
|
209
203
|
weatherLocationName: zod_1.z.string().default(''),
|
|
210
|
-
windSpeedUnits: widgetUnitsSchema.default('rotate'),
|
|
211
|
-
temperatureUnits: widgetUnitsSchema.default('rotate'),
|
|
212
204
|
})
|
|
213
205
|
.default({
|
|
214
206
|
enabled: true,
|
|
@@ -219,8 +211,6 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
219
211
|
showWeather: false,
|
|
220
212
|
weatherLocationKey: '',
|
|
221
213
|
weatherLocationName: '',
|
|
222
|
-
windSpeedUnits: 'rotate',
|
|
223
|
-
temperatureUnits: 'rotate',
|
|
224
214
|
}),
|
|
225
215
|
fr24FlightInfoSource: zod_1.z
|
|
226
216
|
.object({
|
|
@@ -88,30 +88,3 @@ const DEFAULT_CAPTURE_CONFIG = { defaultCaptureSizeMeters: 120, captureSizeExten
|
|
|
88
88
|
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
|
-
(0, globals_1.describe)('cameraSettingsSchema widget units', () => {
|
|
92
|
-
const WIDGET = { coord: 'top_left', posX: 10, posY: 10, scale: 100 };
|
|
93
|
-
(0, globals_1.test)('defaults all widget units to rotate', () => {
|
|
94
|
-
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({});
|
|
95
|
-
(0, globals_1.expect)(settings.widget.units).toBe('rotate');
|
|
96
|
-
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
97
|
-
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
98
|
-
});
|
|
99
|
-
(0, globals_1.test)('defaults missing units of saved widgets to rotate', () => {
|
|
100
|
-
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ widget: WIDGET, airportWidget: WIDGET });
|
|
101
|
-
(0, globals_1.expect)(settings.widget.units).toBe('rotate');
|
|
102
|
-
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
103
|
-
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
104
|
-
});
|
|
105
|
-
(0, globals_1.test)('parses independent widget units', () => {
|
|
106
|
-
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({
|
|
107
|
-
widget: { ...WIDGET, units: 'imperial' },
|
|
108
|
-
airportWidget: { ...WIDGET, windSpeedUnits: 'rotate', temperatureUnits: 'metric' },
|
|
109
|
-
});
|
|
110
|
-
(0, globals_1.expect)(settings.widget.units).toBe('imperial');
|
|
111
|
-
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
112
|
-
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('metric');
|
|
113
|
-
});
|
|
114
|
-
(0, globals_1.test)('rejects an unknown widget unit', () => {
|
|
115
|
-
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ widget: { ...WIDGET, units: 'kelvin' } }).success).toBe(false);
|
|
116
|
-
});
|
|
117
|
-
});
|
package/esm/CamSwitcherAPI.js
CHANGED
|
@@ -153,6 +153,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
153
153
|
audio: {
|
|
154
154
|
sampleRate: data.audioSampleRate,
|
|
155
155
|
channelCount: data.audioChannelCount,
|
|
156
|
+
bitrate: data.audioBitrate,
|
|
156
157
|
},
|
|
157
158
|
keyboard: data.keyboard,
|
|
158
159
|
};
|
|
@@ -204,6 +205,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
204
205
|
const settings = {
|
|
205
206
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
206
207
|
audioChannelCount: saveData.audio?.channelCount,
|
|
208
|
+
audioBitrate: saveData.audio?.bitrate,
|
|
207
209
|
keyboard: saveData.keyboard,
|
|
208
210
|
fps: saveData.video.fps,
|
|
209
211
|
resolution: saveData.video.resolution,
|
|
@@ -142,6 +142,7 @@ export const cameraOptionsSchema = bitrateVapixParamsSchema
|
|
|
142
142
|
bitrateVapixParams: z.string().nullable(),
|
|
143
143
|
audioSampleRate: z.number(),
|
|
144
144
|
audioChannelCount: audioChannelCountSchema,
|
|
145
|
+
audioBitrate: z.number().int().nonnegative(),
|
|
145
146
|
keyboard: z.object({
|
|
146
147
|
fromSource: keyboardShortcutSchema,
|
|
147
148
|
none: keyboardShortcutSchema,
|
|
@@ -25,7 +25,6 @@ export const widgetSchema = z.object({
|
|
|
25
25
|
posY: z.number().nonnegative(),
|
|
26
26
|
scale: z.number().positive(),
|
|
27
27
|
});
|
|
28
|
-
const widgetUnitsSchema = z.union([z.literal('metric'), z.literal('imperial'), z.literal('rotate')]);
|
|
29
28
|
const labelOptionsSchema = z.union([
|
|
30
29
|
z.literal('blank'),
|
|
31
30
|
z.literal('registration'),
|
|
@@ -187,25 +186,18 @@ export const cameraSettingsSchema = z.object({
|
|
|
187
186
|
displaySystemInfo: z.boolean().optional(),
|
|
188
187
|
})
|
|
189
188
|
.optional(),
|
|
190
|
-
widget: widgetSchema
|
|
191
|
-
.extend({
|
|
192
|
-
units: widgetUnitsSchema.default('rotate'),
|
|
193
|
-
})
|
|
194
|
-
.default({
|
|
189
|
+
widget: widgetSchema.default({
|
|
195
190
|
enabled: true,
|
|
196
191
|
coord: 'top_right',
|
|
197
192
|
posX: 10,
|
|
198
193
|
posY: 10,
|
|
199
194
|
scale: 100,
|
|
200
|
-
units: 'rotate',
|
|
201
195
|
}),
|
|
202
196
|
airportWidget: widgetSchema
|
|
203
197
|
.extend({
|
|
204
198
|
showWeather: z.boolean().default(false),
|
|
205
199
|
weatherLocationKey: z.string().default(''),
|
|
206
200
|
weatherLocationName: z.string().default(''),
|
|
207
|
-
windSpeedUnits: widgetUnitsSchema.default('rotate'),
|
|
208
|
-
temperatureUnits: widgetUnitsSchema.default('rotate'),
|
|
209
201
|
})
|
|
210
202
|
.default({
|
|
211
203
|
enabled: true,
|
|
@@ -216,8 +208,6 @@ export const cameraSettingsSchema = z.object({
|
|
|
216
208
|
showWeather: false,
|
|
217
209
|
weatherLocationKey: '',
|
|
218
210
|
weatherLocationName: '',
|
|
219
|
-
windSpeedUnits: 'rotate',
|
|
220
|
-
temperatureUnits: 'rotate',
|
|
221
211
|
}),
|
|
222
212
|
fr24FlightInfoSource: z
|
|
223
213
|
.object({
|
|
@@ -86,30 +86,3 @@ describe('cameraSettingsSchema cameraConfig', () => {
|
|
|
86
86
|
expect(cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
-
describe('cameraSettingsSchema widget units', () => {
|
|
90
|
-
const WIDGET = { coord: 'top_left', posX: 10, posY: 10, scale: 100 };
|
|
91
|
-
test('defaults all widget units to rotate', () => {
|
|
92
|
-
const settings = cameraSettingsSchema.parse({});
|
|
93
|
-
expect(settings.widget.units).toBe('rotate');
|
|
94
|
-
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
95
|
-
expect(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
96
|
-
});
|
|
97
|
-
test('defaults missing units of saved widgets to rotate', () => {
|
|
98
|
-
const settings = cameraSettingsSchema.parse({ widget: WIDGET, airportWidget: WIDGET });
|
|
99
|
-
expect(settings.widget.units).toBe('rotate');
|
|
100
|
-
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
101
|
-
expect(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
102
|
-
});
|
|
103
|
-
test('parses independent widget units', () => {
|
|
104
|
-
const settings = cameraSettingsSchema.parse({
|
|
105
|
-
widget: { ...WIDGET, units: 'imperial' },
|
|
106
|
-
airportWidget: { ...WIDGET, windSpeedUnits: 'rotate', temperatureUnits: 'metric' },
|
|
107
|
-
});
|
|
108
|
-
expect(settings.widget.units).toBe('imperial');
|
|
109
|
-
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
110
|
-
expect(settings.airportWidget.temperatureUnits).toBe('metric');
|
|
111
|
-
});
|
|
112
|
-
test('rejects an unknown widget unit', () => {
|
|
113
|
-
expect(cameraSettingsSchema.safeParse({ widget: { ...WIDGET, units: 'kelvin' } }).success).toBe(false);
|
|
114
|
-
});
|
|
115
|
-
});
|
package/package.json
CHANGED
|
@@ -161,6 +161,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
161
161
|
bitrateVapixParams?: string | null | undefined;
|
|
162
162
|
audioSampleRate?: number | undefined;
|
|
163
163
|
audioChannelCount?: 1 | 2 | undefined;
|
|
164
|
+
audioBitrate?: number | undefined;
|
|
164
165
|
} | undefined>;
|
|
165
166
|
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
166
167
|
type: "source" | "fromSource";
|
|
@@ -87,7 +87,6 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
87
87
|
widget: {
|
|
88
88
|
enabled: boolean;
|
|
89
89
|
scale: number;
|
|
90
|
-
units: "rotate" | "metric" | "imperial";
|
|
91
90
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
92
91
|
posX: number;
|
|
93
92
|
posY: number;
|
|
@@ -101,8 +100,6 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
101
100
|
posY: number;
|
|
102
101
|
showWeather: boolean;
|
|
103
102
|
weatherLocationKey: string;
|
|
104
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
105
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
106
103
|
};
|
|
107
104
|
fr24FlightInfoSource: {
|
|
108
105
|
enabled: boolean;
|
|
@@ -785,6 +785,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
785
785
|
bitrateVapixParams: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
786
|
audioSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
787
787
|
audioChannelCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
788
|
+
audioBitrate: z.ZodOptional<z.ZodNumber>;
|
|
788
789
|
keyboard: z.ZodOptional<z.ZodObject<{
|
|
789
790
|
fromSource: z.ZodNullable<z.ZodString>;
|
|
790
791
|
none: z.ZodNullable<z.ZodString>;
|
|
@@ -812,6 +813,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
812
813
|
bitrateVapixParams?: string | null | undefined;
|
|
813
814
|
audioSampleRate?: number | undefined;
|
|
814
815
|
audioChannelCount?: 1 | 2 | undefined;
|
|
816
|
+
audioBitrate?: number | undefined;
|
|
815
817
|
}, {
|
|
816
818
|
resolution?: string | undefined;
|
|
817
819
|
compression?: number | undefined;
|
|
@@ -829,6 +831,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
829
831
|
bitrateVapixParams?: string | null | undefined;
|
|
830
832
|
audioSampleRate?: number | undefined;
|
|
831
833
|
audioChannelCount?: 1 | 2 | undefined;
|
|
834
|
+
audioBitrate?: number | undefined;
|
|
832
835
|
}>;
|
|
833
836
|
export type TCameraOptions = z.infer<typeof cameraOptionsSchema>;
|
|
834
837
|
export declare const globalAudioSettingsTypeSchema: z.ZodUnion<[z.ZodLiteral<"fromSource">, z.ZodLiteral<"source">]>;
|
|
@@ -54,8 +54,6 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
54
54
|
posY: number;
|
|
55
55
|
enabled?: boolean | undefined;
|
|
56
56
|
}>;
|
|
57
|
-
declare const widgetUnitsSchema: z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>;
|
|
58
|
-
export type TWidgetUnits = z.infer<typeof widgetUnitsSchema>;
|
|
59
57
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
60
58
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
61
59
|
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
@@ -315,12 +313,9 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
315
313
|
posX: z.ZodNumber;
|
|
316
314
|
posY: z.ZodNumber;
|
|
317
315
|
scale: z.ZodNumber;
|
|
318
|
-
} & {
|
|
319
|
-
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
320
316
|
}, "strip", z.ZodTypeAny, {
|
|
321
317
|
enabled: boolean;
|
|
322
318
|
scale: number;
|
|
323
|
-
units: "rotate" | "metric" | "imperial";
|
|
324
319
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
325
320
|
posX: number;
|
|
326
321
|
posY: number;
|
|
@@ -330,7 +325,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
330
325
|
posX: number;
|
|
331
326
|
posY: number;
|
|
332
327
|
enabled?: boolean | undefined;
|
|
333
|
-
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
334
328
|
}>>;
|
|
335
329
|
airportWidget: z.ZodDefault<z.ZodObject<{
|
|
336
330
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -342,8 +336,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
342
336
|
showWeather: z.ZodDefault<z.ZodBoolean>;
|
|
343
337
|
weatherLocationKey: z.ZodDefault<z.ZodString>;
|
|
344
338
|
weatherLocationName: z.ZodDefault<z.ZodString>;
|
|
345
|
-
windSpeedUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
346
|
-
temperatureUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
347
339
|
}, "strip", z.ZodTypeAny, {
|
|
348
340
|
enabled: boolean;
|
|
349
341
|
scale: number;
|
|
@@ -353,8 +345,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
353
345
|
posY: number;
|
|
354
346
|
showWeather: boolean;
|
|
355
347
|
weatherLocationKey: string;
|
|
356
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
357
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
358
348
|
}, {
|
|
359
349
|
scale: number;
|
|
360
350
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
@@ -364,8 +354,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
364
354
|
weatherLocationName?: string | undefined;
|
|
365
355
|
showWeather?: boolean | undefined;
|
|
366
356
|
weatherLocationKey?: string | undefined;
|
|
367
|
-
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
368
|
-
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
369
357
|
}>>;
|
|
370
358
|
fr24FlightInfoSource: z.ZodDefault<z.ZodObject<{
|
|
371
359
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -626,7 +614,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
626
614
|
widget: {
|
|
627
615
|
enabled: boolean;
|
|
628
616
|
scale: number;
|
|
629
|
-
units: "rotate" | "metric" | "imperial";
|
|
630
617
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
631
618
|
posX: number;
|
|
632
619
|
posY: number;
|
|
@@ -640,8 +627,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
640
627
|
posY: number;
|
|
641
628
|
showWeather: boolean;
|
|
642
629
|
weatherLocationKey: string;
|
|
643
|
-
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
644
|
-
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
645
630
|
};
|
|
646
631
|
fr24FlightInfoSource: {
|
|
647
632
|
enabled: boolean;
|
|
@@ -817,7 +802,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
817
802
|
posX: number;
|
|
818
803
|
posY: number;
|
|
819
804
|
enabled?: boolean | undefined;
|
|
820
|
-
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
821
805
|
} | undefined;
|
|
822
806
|
airportWidget?: {
|
|
823
807
|
scale: number;
|
|
@@ -828,8 +812,6 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
828
812
|
weatherLocationName?: string | undefined;
|
|
829
813
|
showWeather?: boolean | undefined;
|
|
830
814
|
weatherLocationKey?: string | undefined;
|
|
831
|
-
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
832
|
-
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
833
815
|
} | undefined;
|
|
834
816
|
fr24FlightInfoSource?: {
|
|
835
817
|
enabled?: boolean | undefined;
|