| | |
| | | @Override |
| | | public StreamInfo getStreamInfoByAppAndStreamWithCheck(String app, String stream, String mediaServerId, String addr) { |
| | | StreamInfo streamInfo = null; |
| | | MediaServerItem mediaInfo = mediaServerService.getOne(mediaServerId); |
| | | |
| | | MediaServerItem mediaInfo; |
| | | if (mediaServerId == null) { |
| | | mediaInfo = mediaServerService.getDefaultMediaServer(); |
| | | }else { |
| | | mediaInfo = mediaServerService.getOne(mediaServerId); |
| | | } |
| | | if (mediaInfo == null) { |
| | | return streamInfo; |
| | | } |
| | |
| | | } |
| | | return streamInfo; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public StreamInfo getStreamInfoByAppAndStreamWithCheck(String app, String stream, String mediaServerId) { |
| | |
| | | streamInfoResult.setHttps_ts(String.format("https://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); |
| | | streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); |
| | | streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); |
| | | streamInfoResult.setRtc(String.format("http://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream)); |
| | | streamInfoResult.setRtc(String.format("https://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream)); |
| | | } |
| | | |
| | | streamInfoResult.setTracks(tracks); |