فهرست منبع

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

liujunchi 2 سال پیش
والد
کامیت
02bd76fd1e

+ 6 - 0
mec-biz/pom.xml

@@ -58,5 +58,11 @@
 			<version>1.0.0</version>
 		</dependency>
 
+		<!--修复依赖冲突-->
+		<dependency>
+			<groupId>org.jetbrains.kotlin</groupId>
+			<artifactId>kotlin-stdlib</artifactId>
+		</dependency>
+
     </dependencies>
 </project>

+ 11 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java

@@ -2,7 +2,6 @@ package com.ym.mec.biz.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -33,7 +32,6 @@ import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoom;
 import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoomData;
 import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoomMember;
 import com.ym.mec.biz.dal.entity.ImLiveRoomBlack;
-import com.ym.mec.biz.dal.entity.ImLiveRoomVideo;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.page.LiveRoomGoodsOrderQueryInfo;
 import com.ym.mec.biz.dal.vo.*;
@@ -1506,6 +1504,17 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             // 创建直播间IM群
             pluginService.chatRoomCreate(room.getRoomUid(), room.getRoomTitle(),sysUser.getId().toString());
 
+            // 腾讯云直播,提前生成录制规则
+            if (room.getServiceProvider().equals(TencentCloudLivePlugin.PLUGIN_NAME)) {
+
+                RTCRequest.RecordStart recordStart = RTCRequest.RecordStart.builder()
+                        .streamName(MessageFormat.format("{0}_{1}", room.getRoomUid(), room.getSpeakerId().toString()))
+                        .build();
+
+                // 生成录制规则
+                pluginService.rtcRoomRecordStart(recordStart);
+            }
+
             // imFeignService.createLiveRoom(room.getRoomUid(), room.getRoomTitle());
             //推送预约直播间消息
             imLiveRoomReservationService.push(room);

+ 2 - 2
mec-im/src/main/java/com/ym/controller/UserController.java

@@ -109,13 +109,13 @@ public class UserController {
         // 断流事件通知
         if (event.getEventType() == 0) {
             // 自动关闭录制
-            liveRoomService.stopTencentLiveVideoRecord(event.getStreamId());
+            // liveRoomService.stopTencentLiveVideoRecord(event.getStreamId());
         }
 
         // 推流事件通知
         if (event.getEventType() == 1) {
             // 自动开启录制
-            liveRoomService.strartTencentLiveVideoRecord(event.getStreamId());
+            // liveRoomService.strartTencentLiveVideoRecord(event.getStreamId());
         }
 
         return TencentData.StreamEventCallbackResult.builder().code(0).build();

+ 7 - 0
pom.xml

@@ -227,6 +227,13 @@
 				<version>1.2.2</version>
 			</dependency>
 
+			<!--修复依赖冲突-->
+			<dependency>
+				<groupId>org.jetbrains.kotlin</groupId>
+				<artifactId>kotlin-stdlib</artifactId>
+				<version>1.3.70</version>
+			</dependency>
+
 		</dependencies>
 	</dependencyManagement>