| | |
| | | |
| | | /** |
| | | * Get live capability data of all drones in the current user's workspace from the database. |
| | | * @param request |
| | | * 从数据库中获取当前工作区中所有无人机的实时性能数据。 |
| | | * @param workspaceId |
| | | * @return live capability |
| | | */ |
| | | @GetMapping("/capacity") |
| | | public ResponseResult<List<CapacityDeviceDTO>> getLiveCapacity(HttpServletRequest request) { |
| | | // Get information about the current user. |
| | | CustomClaim customClaim = (CustomClaim)request.getAttribute(TOKEN_CLAIM); |
| | | @GetMapping("/capacity/{workspace_id}") |
| | | public ResponseResult<List<CapacityDeviceDTO>> getLiveCapacity(@PathVariable("workspace_id") String workspaceId,String sn) { |
| | | // Get information about the current user. 获取当前登录用户的信息 |
| | | // CustomClaim customClaim = (CustomClaim)request.getAttribute(TOKEN_CLAIM); |
| | | |
| | | List<CapacityDeviceDTO> liveCapacity = liveStreamService.getLiveCapacity(customClaim.getWorkspaceId()); |
| | | List<CapacityDeviceDTO> liveCapacity = liveStreamService.getLiveCapacity(workspaceId,sn); |
| | | |
| | | return ResponseResult.success(liveCapacity); |
| | | } |
| | | |
| | | /** |
| | | * Live streaming according to the parameters passed in from the web side. |
| | | * 根据从web端传入的参数进行直播。 |
| | | * @param liveParam Live streaming parameters. |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * Stop live streaming according to the parameters passed in from the web side. |
| | | * 根据从web端传入的参数停止直播。 |
| | | * @param liveParam Live streaming parameters. |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Set the quality of the live streaming according to the parameters passed in from the web side. |
| | | * @param liveParam Live streaming parameters. |
| | | * 根据从web端传入的参数设置直播的质量。 |
| | | * @param liveParam 直播参数 |
| | | * @return |
| | | */ |
| | | @PostMapping("/streams/update") |
| | |
| | | return liveStreamService.liveSetQuality(liveParam); |
| | | } |
| | | |
| | | } |
| | | @PostMapping("/streams/switch") |
| | | public ResponseResult liveLensChange(@RequestBody LiveTypeDTO liveParam) { |
| | | return liveStreamService.liveLensChange(liveParam); |
| | | } |
| | | |
| | | } |