فهرست منبع

fix:测试直播录制

liujunchi 3 سال پیش
والد
کامیت
a8baa48580
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      mec-im/src/main/java/com/ym/service/Impl/LiveRoomServiceImpl.java

+ 8 - 0
mec-im/src/main/java/com/ym/service/Impl/LiveRoomServiceImpl.java

@@ -108,6 +108,14 @@ public class LiveRoomServiceImpl implements LiveRoomService {
 
     @Override
     public void startRecord(String roomId, String videoResolution) throws Exception {
+
+        ImLiveRoomVideo video = imLiveRoomVideoService.getOne(new QueryWrapper<ImLiveRoomVideo>().eq("room_uid_", roomId).last("limit 1"));
+
+        if (video != null) {
+            log.error("已经开启了录制");
+            return;
+        }
+
         log.error("开始录制直播:roomId : {} ", roomId);
         JSONObject paramJson = new JSONObject();
         paramJson.put("sessionId", getRoomSessionId(roomId));