diff --git a/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java index e7e79a87..ae386fc9 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java @@ -402,6 +402,7 @@ public class MediaServerServiceImpl implements IMediaServerService { logger.info("[添加媒体节点] 失败, mediaServer的类型: {},未找到对应的实现类", mediaServer.getType()); return; } + mediaServerMapper.add(mediaServer); if (mediaServer.isStatus()) { mediaNodeServerService.online(mediaServer); diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java index 74a6fce3..e91ced9d 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java @@ -94,6 +94,8 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService { MediaServer mediaServer = new MediaServer(); mediaServer.setIp(ip); mediaServer.setHttpPort(port); + mediaServer.setFlvPort(port); + mediaServer.setWsFlvPort(port); mediaServer.setSecret(secret); JSONObject responseJSON = zlmresTfulUtils.getMediaServerConfig(mediaServer); if (responseJSON == null) { @@ -109,12 +111,15 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService { } mediaServer.setId(zlmServerConfig.getGeneralMediaServerId()); mediaServer.setHttpSSlPort(zlmServerConfig.getHttpPort()); + mediaServer.setFlvSSLPort(zlmServerConfig.getHttpPort()); + mediaServer.setWsFlvSSLPort(zlmServerConfig.getHttpPort()); mediaServer.setRtmpPort(zlmServerConfig.getRtmpPort()); mediaServer.setRtmpSSlPort(zlmServerConfig.getRtmpSslPort()); mediaServer.setRtspPort(zlmServerConfig.getRtspPort()); mediaServer.setRtspSSLPort(zlmServerConfig.getRtspSSlport()); mediaServer.setRtpProxyPort(zlmServerConfig.getRtpProxyPort()); mediaServer.setStreamIp(ip); + mediaServer.setHookIp(sipIp.split(",")[0]); mediaServer.setSdpIp(ip); mediaServer.setType("zlm");