Commit 05960d357318a62ecfe1e9c29beafae2251c72a4
1 parent
9aa9b15b
修复重启zlm导致的点播失败
Showing
1 changed file
with
5 additions
and
0 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 21 | 21 | import org.springframework.beans.factory.annotation.Value; |
| 22 | 22 | import org.springframework.http.HttpStatus; |
| 23 | 23 | import org.springframework.http.ResponseEntity; |
| 24 | +import org.springframework.util.StringUtils; | |
| 24 | 25 | import org.springframework.web.bind.annotation.PostMapping; |
| 25 | 26 | import org.springframework.web.bind.annotation.RequestBody; |
| 26 | 27 | import org.springframework.web.bind.annotation.RequestMapping; |
| ... | ... | @@ -68,6 +69,9 @@ public class ZLMHttpHookListener { |
| 68 | 69 | @Value("${media.ip}") |
| 69 | 70 | private String mediaIp; |
| 70 | 71 | |
| 72 | + @Value("${media.wanIp}") | |
| 73 | + private String mediaWanIp; | |
| 74 | + | |
| 71 | 75 | @Value("${media.port}") |
| 72 | 76 | private int mediaPort; |
| 73 | 77 | |
| ... | ... | @@ -358,6 +362,7 @@ public class ZLMHttpHookListener { |
| 358 | 362 | // List<MediaServerConfig> mediaServerConfigs = JSON.parseArray(JSON.toJSONString(json), MediaServerConfig.class); |
| 359 | 363 | // MediaServerConfig mediaServerConfig = mediaServerConfigs.get(0); |
| 360 | 364 | MediaServerConfig mediaServerConfig = JSON.toJavaObject(json, MediaServerConfig.class); |
| 365 | + mediaServerConfig.setWanIp(StringUtils.isEmpty(mediaWanIp)? mediaIp: mediaWanIp); | |
| 361 | 366 | mediaServerConfig.setLocalIP(mediaIp); |
| 362 | 367 | redisCatchStorage.updateMediaInfo(mediaServerConfig); |
| 363 | 368 | // TODO Auto-generated method stub | ... | ... |