feat: Implement support for gesture-based PTZ control (#2378)
- Closes: #1839
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user