Prechádzať zdrojové kódy

Merge branch 'dev_20230222_live' of http://git.dayaedu.com/yonge/mec into dev_20230222_live

Eric 2 rokov pred
rodič
commit
08cd77f825

+ 9 - 9
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherImLiveBroadcastRoomController.java

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

+ 8 - 9
mec-web/src/main/java/com/ym/mec/web/controller/ImLiveBroadcastRoomController.java

@@ -197,19 +197,18 @@ public class ImLiveBroadcastRoomController extends BaseController {
         return succeed();
         return succeed();
     }
     }
 
 
-    @ApiOperation("开启/关闭直播的录像 -接口废弃")
+    @ApiOperation("开启/关闭直播的录像 -融云使用")
     @GetMapping("/opsLiveVideo")
     @GetMapping("/opsLiveVideo")
     public HttpResponseResult<Object> opsLiveVideo(@ApiParam(value = "房间uid", required = true) String roomUid,
     public HttpResponseResult<Object> opsLiveVideo(@ApiParam(value = "房间uid", required = true) String roomUid,
                                                    @ApiParam(value = "用户id", required = true) Integer userId,
                                                    @ApiParam(value = "用户id", required = true) Integer userId,
                                                    @ApiParam(value = "type 1:开始直播-开始录像     2:关闭直播关闭录像", required = true) Integer type) {
                                                    @ApiParam(value = "type 1:开始直播-开始录像     2:关闭直播关闭录像", required = true) Integer type) {
-        // 接口废弃
-        // if (type == 1) {
-        //     imLiveBroadcastRoomService.startLive(roomUid, userId, null);
-        // } else if (type == 2) {
-        //     imLiveBroadcastRoomService.closeLive(roomUid, userId);
-        // } else {
-        //     failed("type参数错误");
-        // }
+        if (type == 1) {
+            imLiveBroadcastRoomService.startLive(roomUid, userId, null);
+        } else if (type == 2) {
+            imLiveBroadcastRoomService.closeLive(roomUid, userId);
+        } else {
+            failed("type参数错误");
+        }
         return succeed();
         return succeed();
     }
     }