|
@@ -231,21 +231,23 @@ public class RoomServiceImpl implements RoomService {
|
|
|
RoleEnum roleEnum;
|
|
|
|
|
|
|
|
|
- String rtcServiceProvider = Optional.ofNullable(sysConfigDao.findConfigValue(SysConfigService.RTC_SERVICE_PROVIDER))
|
|
|
- .orElse(RongCloudRTCPlugin.PLUGIN_NAME);
|
|
|
+ if (StringUtils.isBlank(courseSchedule.getServiceProvider())) {
|
|
|
|
|
|
-
|
|
|
- {
|
|
|
- List<Integer> collect = Arrays.stream(Optional.ofNullable(sysConfigDao.findConfigValue(SysConfigService.TENCENT_RTC_SERVICE_PROVIDER)).orElse("").split(","))
|
|
|
- .filter(StringUtils::isNotBlank)
|
|
|
- .map(Integer::parseInt).distinct().collect(Collectors.toList());
|
|
|
+ String rtcServiceProvider = Optional.ofNullable(sysConfigDao.findConfigValue(SysConfigService.RTC_SERVICE_PROVIDER))
|
|
|
+ .orElse(RongCloudRTCPlugin.PLUGIN_NAME);
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ List<Integer> collect = Arrays.stream(Optional.ofNullable(sysConfigDao.findConfigValue(SysConfigService.TENCENT_RTC_SERVICE_PROVIDER)).orElse("").split(","))
|
|
|
+ .filter(StringUtils::isNotBlank)
|
|
|
+ .map(Integer::parseInt).distinct().collect(Collectors.toList());
|
|
|
|
|
|
- if (collect.contains(courseSchedule.getOrganId())) {
|
|
|
-
|
|
|
- rtcServiceProvider = TencentCloudRTCPlugin.PLUGIN_NAME;
|
|
|
+ if (collect.contains(courseSchedule.getOrganId())) {
|
|
|
+
|
|
|
+ rtcServiceProvider = TencentCloudRTCPlugin.PLUGIN_NAME;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(courseSchedule.getServiceProvider())) {
|
|
|
+
|
|
|
courseSchedule.setServiceProvider(rtcServiceProvider);
|
|
|
}
|
|
|
|
|
@@ -271,7 +273,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
userName = sysUser.getUsername();
|
|
|
|
|
|
|
|
|
- if (TencentCloudRTCPlugin.PLUGIN_NAME.equals(rtcServiceProvider)) {
|
|
|
+ if (TencentCloudRTCPlugin.PLUGIN_NAME.equals(courseSchedule.getServiceProvider())) {
|
|
|
microphone = !muteAll;
|
|
|
}
|
|
|
}
|
|
@@ -303,7 +305,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
throw new BizException("主讲老师不存在");
|
|
|
}
|
|
|
|
|
|
- RTCRoomPluginService pluginService = rtcRoomPluginContext.getPluginService(rtcServiceProvider);
|
|
|
+ RTCRoomPluginService pluginService = rtcRoomPluginContext.getPluginService(courseSchedule.getServiceProvider());
|
|
|
if (TencentCloudRTCPlugin.PLUGIN_NAME.equals(pluginService.pluginName())) {
|
|
|
|
|
|
|