|
|
@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
@ -68,6 +69,9 @@ public class ZLMHttpHookListener { |
|
|
|
@Value("${media.ip}") |
|
|
|
private String mediaIp; |
|
|
|
|
|
|
|
@Value("${media.wanIp}") |
|
|
|
private String mediaWanIp; |
|
|
|
|
|
|
|
@Value("${media.port}") |
|
|
|
private int mediaPort; |
|
|
|
|
|
|
@ -358,6 +362,7 @@ public class ZLMHttpHookListener { |
|
|
|
// List<MediaServerConfig> mediaServerConfigs = JSON.parseArray(JSON.toJSONString(json), MediaServerConfig.class);
|
|
|
|
// MediaServerConfig mediaServerConfig = mediaServerConfigs.get(0);
|
|
|
|
MediaServerConfig mediaServerConfig = JSON.toJavaObject(json, MediaServerConfig.class); |
|
|
|
mediaServerConfig.setWanIp(StringUtils.isEmpty(mediaWanIp)? mediaIp: mediaWanIp); |
|
|
|
mediaServerConfig.setLocalIP(mediaIp); |
|
|
|
redisCatchStorage.updateMediaInfo(mediaServerConfig); |
|
|
|
// TODO Auto-generated method stub
|
|
|
|