feat: Implement support for gesture-based PTZ control (#2378)

- Closes: #1839
This commit is contained in:
Dermot Duffy
2026-02-28 20:36:53 -08:00
committed by GitHub
parent 40ad3b4460
commit ea86ad0016
32 changed files with 1714 additions and 126 deletions
+8
View File
@@ -1,12 +1,17 @@
import { z } from 'zod';
export const PTZ_CONTROL_TYPES = ['buttons', 'gestures'] as const;
export type PTZControlType = (typeof PTZ_CONTROL_TYPES)[number];
export const ptzControlsDefaults = {
orientation: 'horizontal' as const,
mode: 'auto' as const,
hide_pan_tilt: false,
hide_zoom: false,
hide_home: false,
hide_type: false,
position: 'bottom-right' as const,
type: 'buttons' as const,
};
export const ptzControlsConfigSchema = z.object({
@@ -21,6 +26,9 @@ export const ptzControlsConfigSchema = z.object({
hide_pan_tilt: z.boolean().default(ptzControlsDefaults.hide_pan_tilt),
hide_zoom: z.boolean().default(ptzControlsDefaults.hide_zoom),
hide_home: z.boolean().default(ptzControlsDefaults.hide_home),
hide_type: z.boolean().default(ptzControlsDefaults.hide_type),
type: z.enum(PTZ_CONTROL_TYPES).default(ptzControlsDefaults.type),
style: z.looseObject({}).optional(),
});