|
@@ -116,20 +116,20 @@ public class TeacherImLiveBroadcastRoomController extends BaseController {
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
- @ApiOperation("开启/关闭直播的录像-接口废弃")
|
|
|
+ @ApiOperation("开启/关闭直播的录像-融云使用")
|
|
|
@GetMapping("/opsLiveVideo")
|
|
|
public HttpResponseResult<Object> opsLiveVideo(@ApiParam(value = "房间uid", required = true) String roomUid,
|
|
|
@ApiParam(value = "用户id", required = true) Integer userId,
|
|
|
@ApiParam(value = "type 1:开始直播-开始录像 2:关闭直播关闭录像", required = true) Integer type,
|
|
|
@ApiParam(value = "录制视频的尺寸-默认值是720x1280") String videoResolution) {
|
|
|
- // if (type == 1) {
|
|
|
- // videoResolution = Optional.ofNullable(videoResolution).orElse("720x1280");
|
|
|
- // imLiveBroadcastRoomService.startLive(roomUid, userId, videoResolution);
|
|
|
- // } else if (type == 2) {
|
|
|
- // imLiveBroadcastRoomService.closeLive(roomUid, userId);
|
|
|
- // } else {
|
|
|
- // failed("type参数错误");
|
|
|
- // }
|
|
|
+ if (type == 1) {
|
|
|
+ videoResolution = Optional.ofNullable(videoResolution).orElse("720x1280");
|
|
|
+ imLiveBroadcastRoomService.startLive(roomUid, userId, videoResolution);
|
|
|
+ } else if (type == 2) {
|
|
|
+ imLiveBroadcastRoomService.closeLive(roomUid, userId);
|
|
|
+ } else {
|
|
|
+ failed("type参数错误");
|
|
|
+ }
|
|
|
return succeed();
|
|
|
}
|
|
|
|