浏览代码

直播流

liujc 1 年之前
父节点
当前提交
082cd9d63b

+ 2 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java

@@ -481,8 +481,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
                 DateTime now = DateTime.now();
 
                 RTCRequest.RecordStart recordStart = RTCRequest.RecordStart.builder()
-                        .streamName(MessageFormat.format("{0}_{1}", room.getRoomUid(),
-                                imGroupService.getImUserId(room.getSpeakerId().toString(),ClientEnum.TEACHER.getCode())))
+                        .streamName(getStreamId(room.getRoomUid(),room.getSpeakerId()))
                         .extra("")
                         .startTime(now.toDateTime().getMillis())
                         .endTime(now.plusDays(1).toDateTime().getMillis())
@@ -1733,7 +1732,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
     }
 
     private String getStreamId(String roomUid, Long speakerId) {
-        return roomUid + "_" + speakerId;
+        return roomUid + "_" + imGroupService.getImUserId(speakerId,ClientEnum.TEACHER);
     }