From a3d871022c68053ed5fa2c3d213fca7ec4d2136d Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 21 Jul 2023 15:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/web/gb28181/ApiStreamController.java | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiStreamController.java b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiStreamController.java index 8a1d079d..90b0c2f2 100644 --- a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiStreamController.java +++ b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiStreamController.java @@ -120,17 +120,34 @@ public class ApiStreamController { result.put("ChannelName", deviceChannel.getName()); result.put("ChannelCustomName", ""); result.put("FLV", streamInfo.getFlv().getUrl()); - result.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl()); + if (streamInfo.getHttps_flv() != null) { + result.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl()); + } + result.put("WS_FLV", streamInfo.getWs_flv().getUrl()); - result.put("WSS_FLV", streamInfo.getWss_flv().getUrl()); + if (streamInfo.getWss_flv() != null) { + result.put("WSS_FLV", streamInfo.getWss_flv().getUrl()); + } + result.put("RTMP", streamInfo.getRtmp().getUrl()); - result.put("RTMPS", streamInfo.getRtmps().getUrl()); + if (streamInfo.getRtmps() != null) { + result.put("RTMPS", streamInfo.getRtmps().getUrl()); + } + result.put("HLS", streamInfo.getHls().getUrl()); - result.put("HTTPS_HLS", streamInfo.getHttps_hls().getUrl()); + if (streamInfo.getHttps_hls() != null) { + result.put("HTTPS_HLS", streamInfo.getHttps_hls().getUrl()); + } result.put("RTSP", streamInfo.getRtsp().getUrl()); - result.put("RTSPS", streamInfo.getRtsps().getUrl()); + if (streamInfo.getRtsps() != null) { + result.put("RTSPS", streamInfo.getRtsps().getUrl()); + } + result.put("WEBRTC", streamInfo.getRtc().getUrl()); - result.put("HTTPS_WEBRTC", streamInfo.getRtcs().getUrl()); + if (streamInfo.getRtcs() != null) { + result.put("HTTPS_WEBRTC", streamInfo.getRtcs().getUrl()); + } + result.put("CDN", ""); result.put("SnapURL", ""); result.put("Transport", device.getTransport());