修复ui开启音频无法播放的bug

修复可能导致录象查看的bug
修复开启openRTPServer时的bug
This commit is contained in:
648540858
2020-10-19 14:25:41 +08:00
parent 04af6de363
commit 36cd31d69d
9 changed files with 62 additions and 48 deletions

View File

@@ -140,8 +140,6 @@ public class ZLMHttpHookListener {
streamInfo.setRtmp(String.format("rtmp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtmpPort(), streamId));
streamInfo.setHls(String.format("http://%s:%s/rtp/%s/hls.m3u8", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
streamInfo.setRtsp(String.format("rtsp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtspPort(), streamId));
storager.startPlay(streamInfo);
}

View File

@@ -74,6 +74,15 @@ public class ZLMRESTfulUtils {
return sendPost("getMediaList",param);
}
public JSONObject getMediaInfo(String app, String schema, String stream){
Map<String, Object> param = new HashMap<>();
param.put("app",app);
param.put("schema",schema);
param.put("stream",stream);
param.put("vhost","__defaultVhost__");
return sendPost("getMediaInfo",param);
}
public JSONObject getRtpInfo(String stream_id){
Map<String, Object> param = new HashMap<>();
param.put("stream_id",stream_id);

View File

@@ -37,7 +37,7 @@ public class ZLMUtils {
System.out.println(jsonObject.toJSONString());
return newPort;
}else {
return getNewRTPPort(streamId);
return getNewRTPPort(ssrc);
}
}