-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Camera Feed: Persist last accessed position or preset
- Loading branch information
1 parent
596cbba
commit 351c479
Showing
3 changed files
with
77 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
import { Type } from "../../Redux/api"; | ||
import { OperationAction } from "./useOperateCamera"; | ||
import { OperationAction, PTZPayload } from "./useOperateCamera"; | ||
|
||
export type GetStatusResponse = { | ||
result: { | ||
position: PTZPayload; | ||
moveStatus: { | ||
panTilt: "IDLE" | "MOVING"; | ||
zoom: "IDLE" | "MOVING"; | ||
}; | ||
error: string; | ||
utcTime: string; | ||
}; | ||
}; | ||
|
||
export type GetPresetsResponse = { | ||
result: Record<string, number>; | ||
}; | ||
|
||
export const FeedRoutes = { | ||
operateAsset: { | ||
path: "/api/v1/asset/{id}/operate_assets/", | ||
method: "POST", | ||
TRes: Type<object>(), | ||
TRes: Type<GetStatusResponse | GetPresetsResponse>(), | ||
TBody: Type<{ action: OperationAction }>(), | ||
}, | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters