|
@@ -108,14 +108,6 @@ 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));
|
|
@@ -133,7 +125,7 @@ public class LiveRoomServiceImpl implements LiveRoomService {
|
|
|
log.error("直播视频录制失败:resultInfo : {} ", returnResult);
|
|
|
}
|
|
|
String recordId = resultObject.getString("recordId");
|
|
|
- video = imLiveRoomVideoService.getOne(new QueryWrapper<ImLiveRoomVideo>().eq("room_uid_", roomId).eq("record_id_", recordId).eq("type", 0));
|
|
|
+ ImLiveRoomVideo video = imLiveRoomVideoService.getOne(new QueryWrapper<ImLiveRoomVideo>().eq("room_uid_", roomId).eq("record_id_", recordId).eq("type", 0));
|
|
|
if (Objects.nonNull(video)) {
|
|
|
return;
|
|
|
}
|
|
@@ -295,7 +287,7 @@ public class LiveRoomServiceImpl implements LiveRoomService {
|
|
|
public String getRoomSessionId(String roomId) {
|
|
|
RBucket<String> bucket = redissonClient.getBucket("sessionId:" + roomId);
|
|
|
if (bucket.isExists()) {
|
|
|
- // return bucket.get();
|
|
|
+ return bucket.get();
|
|
|
}
|
|
|
HttpURLConnection conn;
|
|
|
JSONObject resultObject;
|