fix: Configured PTZ actions should overrule auto-detected actions (not merge with them) (#1558)
* fix: Configured PTZ actions should overrule auto-detected actions (not merge with them) * Don't populate capabilities unless there is some basis
This commit is contained in:
@@ -70,13 +70,15 @@ export const getPTZCapabilitiesFromCameraConfig = (
|
||||
zoomOut?.length ||
|
||||
presets?.length
|
||||
? {
|
||||
left: left ?? undefined,
|
||||
right: right ?? undefined,
|
||||
up: up ?? undefined,
|
||||
down: down ?? undefined,
|
||||
zoomIn: zoomIn ?? undefined,
|
||||
zoomOut: zoomOut ?? undefined,
|
||||
presets: presets,
|
||||
// Only return keys with some capability (to aid with action merging
|
||||
// later).
|
||||
...(left ? { left } : {}),
|
||||
...(right ? { right } : {}),
|
||||
...(up ? { up } : {}),
|
||||
...(down ? { down } : {}),
|
||||
...(zoomIn ? { zoomIn } : {}),
|
||||
...(zoomOut ? { zoomOut } : {}),
|
||||
...(presets ? { presets } : {}),
|
||||
}
|
||||
: null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user