Procházet zdrojové kódy

语音对讲功能完成
修复前端axios调用异常

kindring před 2 roky
rodič
revize
6c06d5a3e3
53 změnil soubory, kde provedl 333 přidání a 219 odebrání
  1. 27 25
      src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java
  2. 10 1
      src/main/java/com/genersoft/iot/vmp/gb28181/bean/BroadcastItem.java
  3. 2 1
      src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
  4. 1 0
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorObserver.java
  5. 69 2
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
  6. 2 0
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
  7. 32 15
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
  8. 12 7
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
  9. 5 3
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
  10. 3 0
      src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java
  11. 10 6
      src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
  12. 4 2
      src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
  13. 15 17
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
  14. 47 47
      src/main/resources/application.yml
  15. 1 1
      web_src/src/components/AiLib.vue
  16. 3 3
      web_src/src/components/CloudRecord.vue
  17. 4 4
      web_src/src/components/CloudRecordDetail.vue
  18. 1 1
      web_src/src/components/DeviceList.vue
  19. 1 1
      web_src/src/components/ParentPlatformList.vue
  20. 2 2
      web_src/src/components/PushVideoList.vue
  21. 5 5
      web_src/src/components/StreamProxyList.vue
  22. 2 2
      web_src/src/components/UserManager.vue
  23. 2 2
      web_src/src/components/aiConfig.vue
  24. 2 2
      web_src/src/components/bell.vue
  25. 3 2
      web_src/src/components/common/microphone.vue
  26. 7 7
      web_src/src/components/control.vue
  27. 1 1
      web_src/src/components/createConfig.vue
  28. 1 1
      web_src/src/components/devAiEdit.vue
  29. 2 2
      web_src/src/components/dialog/StreamProxyEdit.vue
  30. 1 1
      web_src/src/components/dialog/SyncChannelProgress.vue
  31. 1 1
      web_src/src/components/dialog/addArithmetic.vue
  32. 2 2
      web_src/src/components/dialog/addUser.vue
  33. 1 1
      web_src/src/components/dialog/catalogEdit.vue
  34. 1 1
      web_src/src/components/dialog/changePassword.vue
  35. 1 1
      web_src/src/components/dialog/changePasswordForAdmin.vue
  36. 1 1
      web_src/src/components/dialog/changePushKey.vue
  37. 1 1
      web_src/src/components/dialog/channelMapInfobox.vue
  38. 1 1
      web_src/src/components/dialog/chooseChannel.vue
  39. 4 4
      web_src/src/components/dialog/chooseChannelForCatalog.vue
  40. 5 5
      web_src/src/components/dialog/chooseChannelForGb.vue
  41. 5 5
      web_src/src/components/dialog/chooseChannelForStream.vue
  42. 15 15
      web_src/src/components/dialog/devicePlayer.vue
  43. 1 1
      web_src/src/components/dialog/editLibItem.vue
  44. 2 2
      web_src/src/components/dialog/getCatalog.vue
  45. 1 1
      web_src/src/components/dialog/importChannel.vue
  46. 1 1
      web_src/src/components/dialog/onvifEdit.vue
  47. 2 2
      web_src/src/components/dialog/platformEdit.vue
  48. 2 2
      web_src/src/components/dialog/pushStreamEdit.vue
  49. 4 4
      web_src/src/components/dialog/recordDownload.vue
  50. 1 1
      web_src/src/components/editLib.vue
  51. 1 1
      web_src/src/components/live.vue
  52. 1 1
      web_src/src/components/map.vue
  53. 2 2
      web_src/src/layout/UiHeader.vue

+ 27 - 25
src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java

@@ -8,6 +8,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
 import org.springframework.util.ObjectUtils;
 
 import java.net.InetAddress;
@@ -15,80 +16,81 @@ import java.net.UnknownHostException;
 import java.util.regex.Pattern;
 
 
-@Configuration("mediaConfig")
-@Order(0)
+//@Configuration("mediaConfig")
+//@Order(0)
+@Component
 public class MediaConfig{
 
     private final static Logger logger = LoggerFactory.getLogger(MediaConfig.class);
 
     // 修改必须配置,不再支持自动获取
-    @Value("${media.id}")
+//    @Value("${media.id}")
     private String id;
 
-    @Value("${media.ip}")
+//    @Value("${media.ip}")
     private String ip;
 
-    @Value("${media.hook-ip:}")
+//    @Value("${media.hook-ip:}")
     private String hookIp;
 
-    @Value("${sip.ip}")
+//    @Value("${sip.ip}")
     private String sipIp;
 
-    @Value("${sip.domain}")
+//    @Value("${sip.domain}")
     private String sipDomain;
 
-    @Value("${media.sdp-ip:${media.ip}}")
+//    @Value("${media.sdp-ip:${media.ip}}")
     private String sdpIp;
 
-    @Value("${media.stream-ip:${media.ip}}")
+//    @Value("${media.stream-ip:${media.ip}}")
     private String streamIp;
 
-    @Value("${media.http-port}")
+//    @Value("${media.http-port}")
     private Integer httpPort;
 
-    @Value("${media.http-ssl-port:0}")
+//    @Value("${media.http-ssl-port:0}")
     private Integer httpSSlPort = 0;
 
-    @Value("${media.rtmp-port:0}")
+//    @Value("${media.rtmp-port:0}")
     private Integer rtmpPort = 0;
 
-    @Value("${media.rtmp-ssl-port:0}")
+//    @Value("${media.rtmp-ssl-port:0}")
     private Integer rtmpSSlPort = 0;
 
-    @Value("${media.rtp-proxy-port:0}")
+//    @Value("${media.rtp-proxy-port:0}")
     private Integer rtpProxyPort = 0;
 
-    @Value("${media.rtsp-port:0}")
+//    @Value("${media.rtsp-port:0}")
     private Integer rtspPort = 0;
 
-    @Value("${media.rtsp-ssl-port:0}")
+//    @Value("${media.rtsp-ssl-port:0}")
     private Integer rtspSSLPort = 0;
 
-    @Value("${media.auto-config:true}")
+//    @Value("${media.auto-config:true}")
     private boolean autoConfig = true;
 
-    @Value("${media.secret}")
+//    @Value("${media.secret}")
     private String secret;
 
-    @Value("${media.stream-none-reader-delay-ms:15000}")
+//    @Value("${media.stream-none-reader-delay-ms:15000}")
     private int streamNoneReaderDelayMS = 15000;
 
-    @Value("${media.rtp.enable}")
+//    @Value("${media.rtp.enable}")
     private boolean rtpEnable;
 
-    @Value("${media.rtp.port-range}")
+//    @Value("${media.rtp.port-range}")
     private String rtpPortRange;
 
 
-    @Value("${media.rtp.send-port-range}")
+//    @Value("${media.rtp.send-port-range}")
     private String sendRtpPortRange;
 
-    @Value("${media.record-assist-port:0}")
+//    @Value("${media.record-assist-port:0}")
     private Integer recordAssistPort = 0;
 
-    @Value("${media.externIP:${media.rtcIp}}")
+//    @Value("${media.externIP:${media.rtcIp}}")
     private String externIP;
-    @Value("${media.externPort:${media.rtcPort}}")
+//    @Value("${media.externPort:${media.rtcPort}}")
     private Integer externPort = 0;
 
     public String getId() {

+ 10 - 1
src/main/java/com/genersoft/iot/vmp/gb28181/bean/BroadcastItem.java

@@ -38,6 +38,10 @@ public class BroadcastItem {
     private String app;
     private String stream;
 
+
+    private String audioCoded;
+
+    private String recv_stream;
     private String mediaId;
 
     private SIPRequest request;
@@ -76,10 +80,15 @@ public class BroadcastItem {
         this.audioCoded = audioCoded;
     }
 
-    private String audioCoded;
 
 
+    public String getRecv_stream() {
+        return recv_stream;
+    }
 
+    public void setRecv_stream(String recv_stream) {
+        this.recv_stream = recv_stream;
+    }
 
     public String getDeviceId() {
         return deviceId;

+ 2 - 1
src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java

@@ -28,7 +28,8 @@ public class VideoStreamSessionManager {
 	public enum SessionType {
 		play,
 		playback,
-		download
+		download,
+		broadcast
 	}
 
 	/**

+ 1 - 0
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorObserver.java

@@ -77,6 +77,7 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
             logger.warn("不支持方法{}的request", method);
             return;
         }
+        logger.info("[device --> server] request: \n{}",requestEvent.getRequest());
         requestProcessorMap.get(method).process(requestEvent);
 
     }

+ 69 - 2
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java

@@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.common.StreamInfo;
 import com.genersoft.iot.vmp.conf.SipConfig;
 import com.genersoft.iot.vmp.conf.UserSetting;
 import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
+import com.genersoft.iot.vmp.gb28181.GBStore;
 import com.genersoft.iot.vmp.gb28181.SipLayer;
 import com.genersoft.iot.vmp.gb28181.bean.*;
 import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
@@ -22,6 +23,7 @@ import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange;
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
 import com.genersoft.iot.vmp.service.IMediaServerService;
 import com.genersoft.iot.vmp.service.bean.SSRCInfo;
+import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
 import com.genersoft.iot.vmp.utils.DateUtil;
 import gov.nist.javax.sip.message.SIPRequest;
 import gov.nist.javax.sip.message.SIPResponse;
@@ -51,6 +53,8 @@ public class SIPCommander implements ISIPCommander {
 
     private final Logger logger = LoggerFactory.getLogger(SIPCommander.class);
 
+    @Autowired
+    private IVideoManagerStorage storager;
     @Autowired
     private SipConfig sipConfig;
 
@@ -80,6 +84,9 @@ public class SIPCommander implements ISIPCommander {
     @Autowired
     private TestInviteRequestProcessor testInviteRequestProcessor;
 
+    @Autowired
+    private GBStore gbStore;
+
     /**
      * 云台方向放控制,使用配置文件中的默认镜头移动速度
      *
@@ -559,12 +566,34 @@ public class SIPCommander implements ISIPCommander {
 //                    device.getHostAddress(),
 //                    device.getPort()
 //            );
-            testInviteRequestProcessor.responseBroadcastSdpACK(request,
+
+            SIPResponse sipResponse = testInviteRequestProcessor.responseBroadcastSdpACK(request,
                     sdpContent,
                     sipConfig.getId(),
                     mediaServerItem.getSdpIp(),
                     sipConfig.getPort()
             );
+            logger.info("[语音广播] 添加sip信息至流媒体服务中");
+            streamSession.put(device.getDeviceId(),
+				device.getDeviceId(),
+				"broadcast",
+				ssrcInfo.getStream(),
+				ssrcInfo.getSsrc(),
+				mediaServerItem.getId(),
+                sipResponse,
+				VideoStreamSessionManager.SessionType.broadcast);
+
+//            ResponseEvent responseEvent = (ResponseEvent) e.event;
+//            SIPResponse response = (SIPResponse) responseEvent.getResponse();
+//            streamSession.put(
+//                    device.getDeviceId(),
+//                    broadcastItem.getChannelId(),
+//                    "play",
+//                    broadcastItem.getRecv_stream(),
+//                    ssrcInfo.getSsrc(),
+//                    mediaServerItem.getId(),
+//                    response,
+//                    VideoStreamSessionManager.SessionType.play);
         }catch(SipException e){
             logger.warn("返回audio invite 失败");
             if(errorEvent != null){
@@ -739,11 +768,49 @@ public class SIPCommander implements ISIPCommander {
         mediaServerService.releaseSsrc(ssrcTransaction.getMediaServerId(), ssrcTransaction.getSsrc());
         mediaServerService.closeRTPServer(ssrcTransaction.getMediaServerId(), ssrcTransaction.getStream());
         streamSession.remove(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getStream());
-
+//        if(ssrcTransaction.getApp){
+//            //        JSONObject result = mediaServerService.closeStreams(mediaServerItem, param.getApp(), param.getStream());
+//        }
         Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo());
         sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent);
     }
 
+    public void streamByeBroadcastCmd(Device device,String channelId){
+
+        // 关闭推流通道
+    }
+
+
+    public boolean stopBroadCast(String deviceId) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
+        String gbStoreKey = "broadcast_"+deviceId;
+        BroadcastItem broadcastItem = gbStore.queryBroadcastStore(gbStoreKey);
+        if(broadcastItem == null){
+            logger.error("无法找到该语音广播信息");
+            return false;
+        }
+        Device device = storager.queryVideoDevice(deviceId);
+        SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(device.getDeviceId(),device.getDeviceId(), "broadcast", broadcastItem.getRecv_stream());
+        logger.info("关闭语音广播:{}",ssrcTransaction);
+        MediaServerItem mediaServerItem = mediaServerService.getOne(broadcastItem.getMediaId());
+        if(mediaServerItem == null){
+            logger.warn("无法连接至语音广播对应的媒体服务器,不尝试从流媒体服务器中获取语音广播信息");
+        }else{
+            // 从mediaServer 中关闭推流通道
+            if(ssrcTransaction != null){
+                mediaServerService.releaseSsrc(ssrcTransaction.getMediaServerId(), ssrcTransaction.getSsrc());
+                mediaServerService.closeRTPServer(ssrcTransaction.getMediaServerId(), ssrcTransaction.getStream());
+            }
+            // 关闭webrtc推流通道
+            mediaServerService.closeStreams(mediaServerItem,broadcastItem.getApp(),broadcastItem.getStream());
+        }
+        gbStore.delBroadcastStore(gbStoreKey);
+        // 发送bye给设备
+        Request byteRequest = headerProvider.createByteRequest(device, broadcastItem.getChannelId(), ssrcTransaction.getSipTransactionInfo());
+        sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, null);
+        return true;
+    }
+
+
 
 
     /**

+ 2 - 0
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java

@@ -1,6 +1,7 @@
 package com.genersoft.iot.vmp.gb28181.transmit.event.request;
 
 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
+import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
 import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
 import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
 import gov.nist.javax.sip.message.SIPRequest;
@@ -161,6 +162,7 @@ public abstract class SIPRequestProcessorParent {
 		responseAckExtraParam.content = sdp;
 		responseAckExtraParam.sipURI = sipURI;
 
+//
 		return responseAck(request, Response.OK, null, responseAckExtraParam);
 	}
 

+ 32 - 15
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

@@ -624,29 +624,46 @@ public class ZLMHttpHookListener {
 
         logger.info("[ZLM HOOK] rtp发送关闭:{}->{}/{}", param.getMediaServerId(), param.getApp(), param.getStream());
         // 如果是音频推流则控制zlm关闭 webrtc流
-
         // 查找对应的上级推流,发送停止
         if (!"rtp".equals(param.getApp()) && !"audio".equals(param.getApp())) {
             logger.warn("[ZLM HOOK] 未知的rtpSend类型中断");
             return HookResult.SUCCESS();
         }
-        // 先停止看看
-        taskExecutor.execute(() -> {
-            List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream());
-            if (sendRtpItems.size() > 0) {
-                for (SendRtpItem sendRtpItem : sendRtpItems) {
-                    ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
-                    try {
-                        commanderFroPlatform.streamByeCmd(parentPlatform, sendRtpItem.getCallId());
-                    } catch (SipException | InvalidArgumentException | ParseException e) {
-                        logger.error("[命令发送失败] 国标级联 发送BYE: {}", e.getMessage());
-                    }
-                    redisCatchStorage.deleteSendRTPServer(parentPlatform.getServerGBId(), sendRtpItem.getChannelId(),
-                            sendRtpItem.getCallId(), sendRtpItem.getStreamId());
+        if("audio".equals(param.getApp())){
+            logger.info("[rtp发送关闭] 语音广播流关闭中...");
+//            通过流id反向查找设备id
+            String streamId = param.getStream();
+            String [] tmp_splitStr = streamId.split("_");
+            String deviceId = "";
+            if(tmp_splitStr.length >= 2){
+                deviceId = tmp_splitStr[1];
+            }
+            try{
+                if(!cmder.stopBroadCast(deviceId)){
+                    logger.error("语音广播关闭异常,无法找到对应的通道");
                 }
+            }catch(InvalidArgumentException | SipException | ParseException | SsrcTransactionNotFoundException e){
+                logger.error("关闭语音流失败,msg:{}",e.getMessage());
             }
-        });
 
+        }else{
+            taskExecutor.execute(() -> {
+                List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream());
+                if (sendRtpItems.size() > 0) {
+                    for (SendRtpItem sendRtpItem : sendRtpItems) {
+                        ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
+                        try {
+                            commanderFroPlatform.streamByeCmd(parentPlatform, sendRtpItem.getCallId());
+                        } catch (SipException | InvalidArgumentException | ParseException e) {
+                            logger.error("[命令发送失败] 国标级联 发送BYE: {}", e.getMessage());
+                        }
+                        redisCatchStorage.deleteSendRTPServer(parentPlatform.getServerGBId(), sendRtpItem.getChannelId(),
+                                sendRtpItem.getCallId(), sendRtpItem.getStreamId());
+                    }
+                }
+            });
+        }
+        // 先停止看看
         return HookResult.SUCCESS();
     }
 

+ 12 - 7
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java

@@ -383,14 +383,19 @@ public class ZLMRTPServerFactory {
         return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param,timeout);
     }
 	
-	/**
-     * 创建音频广播rtp推流通道,被动推流
+
+    /**
+     * 创建音频广播rtp推流通道,tcp被动推流 数据体
      * @param serverItem
-     * @param streamId
+     * @param app
+     * @param recv_stream_id
+     * @param audioStreamId
      * @param ssrc
+     * @param dst_url
+     * @param dst_port
      * @return
      */
-    public Map<String, Object> createStartSendRtpStreamAudioData(MediaServerItem serverItem,String app, String streamId,String recv_stream_id,String ssrc,String dst_url,int dst_port){
+    public Map<String, Object> createStartSendRtpStreamAudioData(MediaServerItem serverItem,String app, String recv_stream_id,String audioStreamId,String ssrc,String dst_url,int dst_port){
 //        String sendRtpPortRange = serverItem.getSendRtpPortRange();
 //        if (ObjectUtils.isEmpty(sendRtpPortRange)) {
 //            logger.error("无法随机获取rtp端口");
@@ -419,8 +424,8 @@ public class ZLMRTPServerFactory {
         param.put("app", app);
 
 
-        param.put("recv_stream_id",streamId );
-        param.put("stream", recv_stream_id);
+        param.put("recv_stream_id",recv_stream_id );
+        param.put("stream", audioStreamId);
 //        param.put("from_mp4", 1);
         param.put("is_udp", 0);
         // start send rtp
@@ -431,7 +436,7 @@ public class ZLMRTPServerFactory {
         param.put("close_delay_ms", 10000);
 
 //        param.put("stream", recv_stream_id);
-        param.put("recv_stream_id", streamId);
+//        param.put("recv_stream_id", streamId);
 
 //        logger.info("[你好] send json: ");
 //        logger.info("[你好] send json: {}",param.toString());

+ 5 - 3
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java

@@ -56,10 +56,12 @@ public class ZLMRunner implements CommandLineRunner {
         mediaServerService.clearMediaServerForOnline();
         MediaServerItem defaultMediaServer = mediaServerService.getDefaultMediaServer();
         if (defaultMediaServer == null) {
-            mediaServerService.addToDatabase(mediaConfig.getMediaSerItem());
+            logger.info("添加zlm至数据库中");
+//            mediaServerService.addToDatabase(mediaConfig.getMediaSerItem());
         }else {
-            MediaServerItem mediaSerItem = mediaConfig.getMediaSerItem();
-            mediaServerService.updateToDatabase(mediaSerItem);
+            logger.info("更新zlm配置至数据库中");
+//            MediaServerItem mediaSerItem = mediaConfig.getMediaSerItem();
+//            mediaServerService.updateToDatabase(mediaSerItem);
         }
         mediaServerService.syncCatchFromDatabase();
         HookSubscribeForServerStarted hookSubscribeForServerStarted = HookSubscribeFactory.on_server_started();

+ 3 - 0
src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java

@@ -1,5 +1,6 @@
 package com.genersoft.iot.vmp.service;
 
+import com.alibaba.fastjson2.JSONObject;
 import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig;
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
 import com.genersoft.iot.vmp.media.zlm.dto.ServerKeepaliveData;
@@ -95,6 +96,8 @@ public interface IMediaServerService {
 
     boolean checkRtpServer(MediaServerItem mediaServerItem, String rtp, String stream);
 
+    JSONObject closeStreams(MediaServerItem mediaServerItem, String app, String streamId);
+
     /**
      * 获取负载信息
      * @return

+ 10 - 6
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java

@@ -174,7 +174,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
 
 
     @Override
-    public SSRCInfo startSendRtpServer(MediaServerItem mediaServerItem,String app, String streamId,String audioStreamId,
+    public SSRCInfo startSendRtpServer(MediaServerItem mediaServerItem,String app, String recv_stream_id,String audioStreamId,
                                        String addr,String port,String _ssrc) {
         if (mediaServerItem == null || mediaServerItem.getId() == null) {
             logger.warn("无法连接至zlm!!!!!!!");
@@ -191,12 +191,12 @@ public class MediaServerServiceImpl implements IMediaServerService {
             String ssrc;
             ssrc = ssrcConfig.getPlaySsrc();
 
-            if (streamId == null) {
-                streamId = String.format("%08x", Integer.parseInt(ssrc)).toUpperCase();
-            }
+//            if (streamId == null) {
+//                streamId = String.format("%08x", Integer.parseInt(ssrc)).toUpperCase();
+//            }
             int rtpServerPort;
             // 创建
-            Map<String, Object> rtpParam = zlmrtpServerFactory.createStartSendRtpStreamAudioData(mediaServerItem,app, streamId,audioStreamId,_ssrc,addr, Integer.parseInt(port));
+            Map<String, Object> rtpParam = zlmrtpServerFactory.createStartSendRtpStreamAudioData(mediaServerItem,app, recv_stream_id,audioStreamId,_ssrc,addr, Integer.parseInt(port));
 //            logger.info("zlm start send {}",rtpParam.toString());
             if (mediaServerItem == null || mediaServerItem.getId() == null) {
                 logger.warn("无法连接至zlm!!!!!!!");
@@ -213,7 +213,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
             if(code != null && code.intValue() != 0){ logger.error("[语音广播 流媒体异常] {}", result.get("msg")); return null; }
             RedisUtil.set(key, mediaServerItem);
             rtpServerPort = (int) result.get("local_port");
-            return new SSRCInfo(rtpServerPort, ssrc, streamId);
+            return new SSRCInfo(rtpServerPort, ssrc, recv_stream_id);
         }
     }
 
@@ -811,6 +811,10 @@ public class MediaServerServiceImpl implements IMediaServerService {
         return false;
     }
 
+    public JSONObject closeStreams(MediaServerItem mediaServerItem,String app,String streamId){
+        return zlmresTfulUtils.closeStreams(mediaServerItem,app,streamId);
+    }
+
     @Override
     public MediaServerLoad getLoad(MediaServerItem mediaServerItem) {
         MediaServerLoad result = new MediaServerLoad();

+ 4 - 2
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java

@@ -37,6 +37,7 @@ import com.genersoft.iot.vmp.utils.redis.RedisUtil;
 import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
 import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
 import gov.nist.javax.sip.message.SIPRequest;
+import gov.nist.javax.sip.message.SIPResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -1062,13 +1063,13 @@ public class PlayServiceImpl implements IPlayService {
         logger.info("[语言广播] 开始返回invite200,并创建zlm服务");
         JSONObject errJson = new JSONObject();
         try {
-            String steamId = broadcastItem.getStream();
+            String steamId = "relay_"+broadcastItem.getStream();
             String ssrcStr = broadcastItem.getSsrc();
             ssrcStr = ssrcStr.replaceAll("\\s*|\r|\n|\t", "");
 
             SSRCInfo ssrcInfo = mediaServerService.startSendRtpServer(mediaServerItem,
                     broadcastItem.getApp(),
-                    broadcastItem.getStream(),
+                    broadcastItem.getRecv_stream(),
                     broadcastItem.getStream(),
                     broadcastItem.getIpcIp(),
                     String.valueOf(broadcastItem.getIpcAudioPort()),
@@ -1085,6 +1086,7 @@ public class PlayServiceImpl implements IPlayService {
                     null,
                     null,
                     null);
+
             //
             callback.run(0, null,null);
         }catch(InvalidArgumentException |  SipException | ParseException e){

+ 15 - 17
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java

@@ -535,6 +535,7 @@ public class PlayController {
 						broadcastItem.setDeviceId(deviceId);
 						broadcastItem.setApp(app);
 						broadcastItem.setStream(stream);
+						broadcastItem.setRecv_stream("recv_"+stream);
 						broadcastItem.setIpcIp((String) json.get("addr"));
 						broadcastItem.setIpcAudioPort((Integer) json.get("port"));
 						broadcastItem.setSsrc((String) json.get("ssrc"));
@@ -556,7 +557,8 @@ public class PlayController {
 										wvpResult.setCode(ErrorCode.ERROR100.getCode());
 										wvpResult.setMsg((String) _json.get("msg"));
 									} else if (_code == 0) {
-										logger.info("收到设备invite信息 开始建立连接: {}",_json);
+										logger.info("回复 invite 200 成功: {}",_json);
+
 										// 获取id
 										resultData.put("mediaId",mediaServerItem.getId());
 										wvpResult.setCode(ErrorCode.SUCCESS.getCode());
@@ -572,15 +574,6 @@ public class PlayController {
 								"broadcast_"+deviceId,
 								broadcastItem
 						);
-//						if(redisCatchStorage.addBroadcastItem(
-//								deviceId,
-//								broadcastItem
-//						)){
-//							logger.info("语音对讲信息存储成功");
-//						}else{
-//							logger.warn("无法存储数据至zlm");
-//						}
-						//设置过期时间
 
 					}
 					msg.setData(wvpResult);
@@ -601,16 +594,21 @@ public class PlayController {
 	@Parameter(name = "channelId", description = "设备通道编号", required = true)
 	@GetMapping("/stopBroadcast")
 	public WVPResult stopBroadcast(@RequestParam("deviceId") String deviceId,@RequestParam("channelId") String channelId){
-		BroadcastItem broadcastItem = gbStore.queryBroadcastStore(
-				"broadcast_"+deviceId
-		);
+//
+//
 		WVPResult wvpResult = new WVPResult();
-		Device device = storager.queryVideoDevice(deviceId);
+//		Device device = storager.queryVideoDevice(deviceId);
 		// 停止音频流,给设备发送bye
 		try {
-			logger.warn("[停止点播] {}/{}", device.getDeviceId(), channelId);
-			cmder.streamByeCmd(device, channelId, broadcastItem.getStream(), null, null);
-			wvpResult.setCode(ErrorCode.SUCCESS.getCode());
+			logger.warn("[停止点播] {}/{}", deviceId, channelId);
+//			cmder.streamByeBroadcastCmd(device, channelId, broadcastItem, null, null);
+			if(!cmder.stopBroadCast(deviceId)){
+				logger.error("语音广播关闭异常,应该是404");
+				wvpResult.setCode(ErrorCode.ERROR404.getCode());
+				wvpResult.setMsg("语音广播关闭失败,无法找到语音广播信息");
+			}else{
+				wvpResult.setCode(ErrorCode.SUCCESS.getCode());
+			}
 		} catch (InvalidArgumentException | SipException | ParseException | SsrcTransactionNotFoundException e) {
 			logger.error("[命令发送失败] 停止语音广播, 发送BYE: {}", e.getMessage());
 			wvpResult.setCode(ErrorCode.ERROR100.getCode());

+ 47 - 47
src/main/resources/application.yml

@@ -123,54 +123,54 @@ sip:
     mediaPath: "mFile"
 
 #zlm 默认服务器配置
-media:
-    # [必须修改] zlm服务器唯一id,用于触发hook时区别是哪台服务器,general.mediaServerId
-    id: your_server_id_fail
-    # [必须修改] zlm服务器的内网IP
-    ip: 191.168.1.60
-    # [可选] 返回流地址时的ip,置空使用 media.ip
-    stream-ip: 192.168.1.60
-    #stream-ip: 192.168.1.203
-    #stream-ip: 113.88.194.58
-    # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip
-    sdp-ip: 192.168.31.60
-    #sdp-ip: 192.168.1.203
-    #sdp-ip: 113.88.194.58
-    # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
-    hook-ip:
-    # [必须修改] zlm服务器的http.port
-    http-port: 15070
-    # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置
-    http-ssl-port: 29010
-    # [可选] zlm服务器的rtmp.port, 置空使用zlm配置文件配置
-    rtmp-port:
-    # [可选] zlm服务器的rtmp.sslport, 置空使用zlm配置文件配置
-    rtmp-ssl-port:
-    # [可选] zlm服务器的 rtp_proxy.port, 置空使用zlm配置文件配置
-    rtp-proxy-port:
-    # [可选] zlm服务器的 rtsp.port, 置空使用zlm配置文件配置
-    rtsp-port:
-    # [可选] zlm服务器的 rtsp.sslport, 置空使用zlm配置文件配置
-    rtsp-ssl-port:
-    # [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改
-    auto-config: true
-    # [可选] zlm服务器的hook.admin_params=secret
-    secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
+#media:
+#    # [必须修改] zlm服务器唯一id,用于触发hook时区别是哪台服务器,general.mediaServerId
+#    id: your_server_id_fail
+#    # [必须修改] zlm服务器的内网IP
+#    ip: 191.168.1.60
+#    # [可选] 返回流地址时的ip,置空使用 media.ip
+#    stream-ip: 192.168.1.60
+#    #stream-ip: 192.168.1.203
+#    #stream-ip: 113.88.194.58
+#    # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip
+#    sdp-ip: 192.168.31.60
+#    #sdp-ip: 192.168.1.203
+#    #sdp-ip: 113.88.194.58
+#    # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
+#    hook-ip:
+#    # [必须修改] zlm服务器的http.port
+#    http-port: 15070
+#    # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置
+#    http-ssl-port: 29010
+#    # [可选] zlm服务器的rtmp.port, 置空使用zlm配置文件配置
+#    rtmp-port:
+#    # [可选] zlm服务器的rtmp.sslport, 置空使用zlm配置文件配置
+#    rtmp-ssl-port:
+#    # [可选] zlm服务器的 rtp_proxy.port, 置空使用zlm配置文件配置
+#    rtp-proxy-port:
+#    # [可选] zlm服务器的 rtsp.port, 置空使用zlm配置文件配置
+#    rtsp-port:
+#    # [可选] zlm服务器的 rtsp.sslport, 置空使用zlm配置文件配置
+#    rtsp-ssl-port:
+#    # [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改
+#    auto-config: true
+#    # [可选] zlm服务器的hook.admin_params=secret
 #    secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
-    # [可选] zlm服务器的general.streamNoneReaderDelayMS
-    stream-none-reader-delay-ms:  60000  # 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流
-    # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试
-    rtp:
-        # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输
-        enable: true
-        # [可选] 在此范围内选择端口用于媒体流传输, 必须提前在zlm上配置该属性,不然自动配置此属性可能不成功
-        port-range: 30000,30500 # 端口范围
-        # [可选] 国标级联在此范围内选择端口发送媒体流
-        send-port-range: 30000,30500 # 端口范围
-    rtcIp:
-    rtcPort:
-    # 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用
-    record-assist-port: 0
+##    secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
+#    # [可选] zlm服务器的general.streamNoneReaderDelayMS
+#    stream-none-reader-delay-ms:  60000  # 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流
+#    # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试
+#    rtp:
+#        # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输
+#        enable: true
+#        # [可选] 在此范围内选择端口用于媒体流传输, 必须提前在zlm上配置该属性,不然自动配置此属性可能不成功
+#        port-range: 30000,30500 # 端口范围
+#        # [可选] 国标级联在此范围内选择端口发送媒体流
+#        send-port-range: 30000,30500 # 端口范围
+#    rtcIp:
+#    rtcPort:
+#    # 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用
+#    record-assist-port: 0
 
 # [可选] 日志配置, 一般不需要改
 logging:

+ 1 - 1
web_src/src/components/AiLib.vue

@@ -108,7 +108,7 @@ export default {
       this.isLoading = true;
       this.searchKey = searchParam.key;
       this.searchArithmetic = searchParam.arithmetic;
-      let [err,res] = await handle(this.$axios({
+      let [err,res] = await handle(this.$axios.axios({
         method: 'get',
         url: `/api/device/query/libs`,
         params: searchParam

+ 3 - 3
web_src/src/components/CloudRecord.vue

@@ -131,7 +131,7 @@
       },
       getRecordList: function (){
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/record_proxy/${that.mediaServerId}/api/record/list`,
           params: {
@@ -164,7 +164,7 @@
         this.recordDetail = true;
         this.chooseRecord = row;
         // 查询是否存在录像
-        // this.$axios({
+        // this.$axios.axios({
         //   method: 'delete',
         //   url:`/record_proxy/api/record/delete`,
         //   params: {
@@ -183,7 +183,7 @@
       deleteRecord(){
 			  // TODO
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'delete',
           url:`/record_proxy/api/record/delete`,
           params: {

+ 4 - 4
web_src/src/components/CloudRecordDetail.vue

@@ -338,7 +338,7 @@
       deleteRecord(){
 			  // TODO
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'delete',
           url:`/record_proxy/${that.mediaServerId}/api/record/delete`,
           params: {
@@ -357,7 +357,7 @@
       getDateInYear(callback){
         let that = this;
         that.dateFilesObj = {};
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/record_proxy/${that.mediaServerId}/api/record/date/list`,
           params: {
@@ -406,7 +406,7 @@
       },
       addTaskToServer(){
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/add`,
           params: {
@@ -431,7 +431,7 @@
       },
       getTaskList(isEnd){
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/list`,
           params: {

+ 1 - 1
web_src/src/components/DeviceList.vue

@@ -286,7 +286,7 @@ export default {
       // let channelId = itemData.channelId;
       // console.log("通知设备推流1:" + deviceId + " : " + channelId);
       // let that = this;
-      // this.$axios({
+      // this.$axios.axios({
       // 	method: 'get',
       // 	url: '/api/play/' + deviceId + '/' + channelId
       // }).then(function(res) {

+ 1 - 1
web_src/src/components/ParentPlatformList.vue

@@ -160,7 +160,7 @@ export default {
     getPlatformList: function() {
       let that = this;
 
-      this.$axios({
+      this.$axios.axios({
       	method: 'get',
         url:`/api/platform/query/${that.count}/${that.currentPage}`
       }).then(function (res) {

+ 2 - 2
web_src/src/components/PushVideoList.vue

@@ -169,7 +169,7 @@ export default {
     getPushList: function () {
       let that = this;
       this.getDeviceListLoading = true;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: `/api/push/list`,
         params: {
@@ -195,7 +195,7 @@ export default {
     playPush: function (row) {
       let that = this;
       this.getListLoading = true;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/push/getPlayUrl',
         params: {

+ 5 - 5
web_src/src/components/StreamProxyList.vue

@@ -165,7 +165,7 @@
 			},
 			getStreamProxyList: function() {
 				let that = this;
-				this.$axios({
+        this.$axios.axios({
 					method: 'get',
 					url:`/api/proxy/list`,
 					params: {
@@ -188,7 +188,7 @@
 				this.$refs.streamProxyEdit.openDialog(null, this.initData)
 			},
       addOnvif: function(){
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/api/onvif/search?timeout=3000`,
         }).then((res) =>{
@@ -216,7 +216,7 @@
 			},
 			play: function(row){
 				let that = this;
-				this.$axios({
+        this.$axios.axios({
 					method: 'get',
 					url:`/api/push/getPlayUrl`,
 					params: {
@@ -261,7 +261,7 @@
 			start: function(row){
         this.stopUpdateList()
         this.$set(row, 'startBtnLoading', true)
-				this.$axios({
+        this.$axios.axios({
 					method: 'get',
 					url:`/api/proxy/start`,
 					params: {
@@ -293,7 +293,7 @@
 			},
 			stop: function(row){
 				let that = this;
-				this.$axios({
+        this.$axios.axios({
 					method: 'get',
 					url:`/api/proxy/stop`,
 					params: {

+ 2 - 2
web_src/src/components/UserManager.vue

@@ -97,7 +97,7 @@ export default {
     getUserList: function () {
       let that = this;
       this.getUserListLoading = true;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: `/api/user/users`,
         params: {
@@ -139,7 +139,7 @@ export default {
         center: true,
         type: 'warning'
       }).then(() => {
-        this.$axios({
+        this.$axios.axios({
           method: 'delete',
           url: `/api/user/delete?id=${row.id}`
         }).then((res) => {

+ 2 - 2
web_src/src/components/aiConfig.vue

@@ -234,7 +234,7 @@ export default {
     async loadAiLib(){
       this.isLoading = true;
       let that = this;
-      let [err,res] = await handle(this.$axios({
+      let [err,res] = await handle(this.$axios.axios({
         method: 'get',
         url: `/api/device/query/aiLibrary`
       }))
@@ -261,7 +261,7 @@ export default {
     loadDeviceAi(){
       this.isLoading = true;
       let that = this;
-      return this.$axios({
+      return this.$axios.axios({
         method: 'get',
         url: '/api/device/query/devAis/' + that.deviceId
       }).then((res) => {

+ 2 - 2
web_src/src/components/bell.vue

@@ -206,10 +206,10 @@ export default {
       }
       searchParam.arithmetic = parseInt(this.aiTypeVal);
       searchParam.alarmState = toAlarmKey(searchParam.alarmState);
-      bellSearchSource = this.$axios.CancelToken.source();
+      bellSearchSource = this.$axios.axios.CancelToken.source();
       this.isLoading = true;
       let [err,res] = await handle(
-        this.$axios.post('/ai/alarms',
+        this.$axios.axios.post('/ai/alarms',
           searchParam,
           {
             cancelToken: bellSearchSource.token

+ 3 - 2
web_src/src/components/common/microphone.vue

@@ -159,8 +159,9 @@ export default {
             this.audioConnected = true;
             this.isRecording = true;
             console.log('创建音视频通道成功');
-          } else if(state === 'close'){
-            this.$message.warning("webrtc连接断开");
+          } else if(state === 'close' || state === "disconnected"){
+            // this.$message.warning("webrtc连接断开");
+            this.audioStartFailed(null,`webrtc连接断开`);
             this.audioConnected = false;
           }
         });

+ 7 - 7
web_src/src/components/control.vue

@@ -325,7 +325,7 @@ export default {
     getThreadsLoad: function () {
       let that = this;
       if (!!that.mediaServerChoose) {
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad'
         }).then(function (res) {
@@ -475,7 +475,7 @@ export default {
     getAllSession: function () {
       this.allSessionData = [];
       if (!!this.mediaServerChoose) {
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url: '/zlm/' + this.mediaServerChoose + '/index/api/getAllSession'
         }).then((res)=> {
@@ -494,7 +494,7 @@ export default {
     },
     getServerConfig: function () {
       if (!!this.mediaServerChoose) {
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url: '/zlm/' + this.mediaServerChoose + '/index/api/getServerConfig'
         }).then((res)=> {
@@ -516,7 +516,7 @@ export default {
     },
     getWVPServerConfig: function () {
       let that = this;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/server/config'
       }).then(function (res) {
@@ -524,7 +524,7 @@ export default {
         that.wvpServerConfig = res.data.data;
         that.wvpVisible = true;
       });
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/server/version'
       }).then(function (res) {
@@ -549,7 +549,7 @@ export default {
         type: 'warning'
       }).then(() => {
         let that = this;
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url: '/zlm/' + that.mediaServerChoose + '/index/api/restartServer'
         }).then(function (res) {
@@ -584,7 +584,7 @@ export default {
     },
     deleteSession: function (id) {
       if (!!this.mediaServerChoose) {
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url: '/zlm/' + this.mediaServerChoose + '/index/api/kick_session?id=' + id
         }).then((res)=>{

+ 1 - 1
web_src/src/components/createConfig.vue

@@ -175,7 +175,7 @@ export default {
     async loadAiLib(){
       this.isLoading = true;
       let that = this;
-      let [err,res] = await handle(this.$axios({
+      let [err,res] = await handle(this.$axios.axios({
         method: 'get',
         url: `/api/device/query/aiLibrary`
       }));

+ 1 - 1
web_src/src/components/devAiEdit.vue

@@ -40,7 +40,7 @@ export default {
     },
     loadAiData(){
       let that = this;
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url: '/api/device/ai/edit/' + that.aiId
       }).then((res) => {

+ 2 - 2
web_src/src/components/dialog/StreamProxyEdit.vue

@@ -193,7 +193,7 @@ export default {
       }
 
       let that = this;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url:`/api/platform/query/10000/1`
       }).then(function (res) {
@@ -228,7 +228,7 @@ export default {
     onSubmit: function () {
       this.dialogLoading = true;
       this.noneReaderHandler();
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url:`/api/proxy/save`,
         data: this.proxyParam

+ 1 - 1
web_src/src/components/dialog/SyncChannelProgress.vue

@@ -53,7 +53,7 @@ export default {
       this.getProgress()
     },
     getProgress(){
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url:`/api/device/query/${this.deviceId}/sync_status/`,
       }).then((res) => {

+ 1 - 1
web_src/src/components/dialog/addArithmetic.vue

@@ -66,7 +66,7 @@ export default {
     },
     async loadAiConfigs(){
       this.isLoading = true;
-      let [err,res] = await handle(this.$axios({
+      let [err,res] = await handle(this.$axios.axios({
         method: 'get',
         url: `/api/device/query/aiConfigs?arithmetic=${this.arithmetic}`
       }))

+ 2 - 2
web_src/src/components/dialog/addUser.vue

@@ -98,7 +98,7 @@ export default {
       this.showDialog = true;
     },
     onSubmit: function () {
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url: "/api/user/add",
         params: {
@@ -137,7 +137,7 @@ export default {
     },
     getAllRole:function () {
 
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: "/api/role/all"
       }).then((res) => {

+ 1 - 1
web_src/src/components/dialog/catalogEdit.vue

@@ -114,7 +114,7 @@ export default {
     onSubmit: function () {
       console.log("onSubmit");
       console.log(this.form);
-      this.$axios({
+      this.$axios.axios({
         method:"post",
         url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`,
         data: this.form

+ 1 - 1
web_src/src/components/dialog/changePassword.vue

@@ -89,7 +89,7 @@ export default {
       this.showDialog = true;
     },
     onSubmit: function () {
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url:"/api/user/changePassword",
         params: {

+ 1 - 1
web_src/src/components/dialog/changePasswordForAdmin.vue

@@ -83,7 +83,7 @@ export default {
       }
     },
     onSubmit: function () {
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url:"/api/user/changePasswordForAdmin",
         params: {

+ 1 - 1
web_src/src/components/dialog/changePushKey.vue

@@ -63,7 +63,7 @@ export default {
       }
     },
     onSubmit: function () {
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url:"/api/user/changePushKey",
         params: {

+ 1 - 1
web_src/src/components/dialog/channelMapInfobox.vue

@@ -42,7 +42,7 @@ export default {
       let channelId = this.channel.channelId;
       console.log("通知设备推流1:" + deviceId + " : " + channelId);
       let that = this;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/play/start/' + deviceId + '/' + channelId
       }).then(function (res) {

+ 1 - 1
web_src/src/components/dialog/chooseChannel.vue

@@ -96,7 +96,7 @@ export default {
         save: function() {
             var that = this;
 
-            this.$axios({
+            this.$axios.axios({
                 method:"post",
                 url:"/api/platform/update_channel_for_gb",
                 data:{

+ 4 - 4
web_src/src/components/dialog/chooseChannelForCatalog.vue

@@ -80,7 +80,7 @@ export default {
 
         getCatalog: function(parentId, callback) {
             let that = this;
-            this.$axios({
+            this.$axios.axios({
                     method:"get",
                     url:`/api/platform/catalog`,
                     params: {
@@ -132,7 +132,7 @@ export default {
 
         },
         removeCatalog: function (id, node){
-          this.$axios({
+          this.$axios.axios({
             method:"delete",
             url:`/api/platform/catalog/del`,
             params: {
@@ -154,7 +154,7 @@ export default {
             });
         },
         setDefaultCatalog: function (id){
-          this.$axios({
+          this.$axios.axios({
             method:"post",
             url:`/api/platform/catalog/default/update`,
             params: {
@@ -199,7 +199,7 @@ export default {
                   icon: "el-icon-delete",
                   disabled: false,
                   onClick: () => {
-                    this.$axios({
+                    this.$axios.axios({
                       method:"delete",
                       url:"/api/platform/catalog/relation/del",
                       data: data

+ 5 - 5
web_src/src/components/dialog/chooseChannelForGb.vue

@@ -119,7 +119,7 @@ export default {
         add: function (row) {
           let all = typeof(row) === "undefined"
           this.getCatalogFromUser((catalogId)=> {
-            this.$axios({
+            this.$axios.axios({
               method:"post",
               url:"/api/platform/update_channel_for_gb",
               data:{
@@ -147,7 +147,7 @@ export default {
           }).then(() => {
             console.log(row)
 
-            this.$axios({
+            this.$axios.axios({
               method:"delete",
               url:"/api/platform/del_channel_for_gb",
               data:{
@@ -246,7 +246,7 @@ export default {
         getChannelList: function () {
             let that = this;
 
-            this.$axios({
+            this.$axios.axios({
                     method:"get",
                     url:`/api/platform/channel_list`,
                     params: {
@@ -288,7 +288,7 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          this.$axios({
+          this.$axios.axios({
             method:"delete",
             url:"/api/platform/del_channel_for_gb",
             data:{
@@ -308,7 +308,7 @@ export default {
       batchAdd: function() {
         this.getCatalogFromUser((catalogId)=> {
 
-          this.$axios({
+          this.$axios.axios({
             method: "post",
             url: "/api/platform/update_channel_for_gb",
             data: {

+ 5 - 5
web_src/src/components/dialog/chooseChannelForStream.vue

@@ -132,7 +132,7 @@ export default {
         add: function (row, scope) {
           let all = typeof(row) === "undefined"
           this.getCatalogFromUser((catalogId)=>{
-            this.$axios({
+            this.$axios.axios({
               method:"post",
               url:"/api/gbStream/add",
               data:{
@@ -161,7 +161,7 @@ export default {
             type: 'warning'
           }).then(() => {
 
-            this.$axios({
+            this.$axios.axios({
               method:"delete",
               url:"/api/gbStream/del",
               data:{
@@ -184,7 +184,7 @@ export default {
         getChannelList: function () {
             let that = this;
 
-            this.$axios({
+            this.$axios.axios({
                 method: 'get',
                 url:`/api/gbStream/list`,
                 params: {
@@ -220,7 +220,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            this.$axios({
+            this.$axios.axios({
               method:"delete",
               url:"/api/gbStream/del",
               data:{
@@ -240,7 +240,7 @@ export default {
         },
         batchAdd: function() {
           this.getCatalogFromUser((catalogId)=>{
-            this.$axios({
+            this.$axios.axios({
               method:"post",
               url:"/api/gbStream/add",
               data:{

+ 15 - 15
web_src/src/components/dialog/devicePlayer.vue

@@ -317,7 +317,7 @@ export default {
             that.tracksLoading = true;
             that.tracksNotLoaded = false;
             if (tab.name === "codec") {
-                this.$axios({
+                this.$axios.axios({
                     method: 'get',
                     url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId
                 }).then(function (res) {
@@ -439,7 +439,7 @@ export default {
         convertStop: function(callback) {
             var that = this;
             that.$refs.videoPlayer.pause()
-            this.$axios({
+            this.$axios.axios({
                 method: 'post',
                 url: '/api/play/convertStop/' + this.convertKey
               }).then(function (res) {
@@ -510,7 +510,7 @@ export default {
             let that = this;
             var startTime = this.videoHistory.date + " 00:00:00";
             var endTime = this.videoHistory.date + " 23:59:59";
-            this.$axios({
+            this.$axios.axios({
                 method: 'get',
                 url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime
             }).then(function (res) {
@@ -552,7 +552,7 @@ export default {
                     that.playRecord(row);
                 })
             } else {
-                this.$axios({
+                this.$axios.axios({
                     method: 'get',
                     url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
                         row.endTime
@@ -578,7 +578,7 @@ export default {
         stopPlayRecord: function (callback) {
           this.$refs[this.activePlayer].pause();
             this.videoUrl = '';
-            this.$axios({
+            this.$axios.axios({
                 method: 'get',
                 url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
             }).then(function (res) {
@@ -602,7 +602,7 @@ export default {
 
                 })
             } else {
-                this.$axios({
+                this.$axios.axios({
                     method: 'get',
                     url: '/api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
                         row.endTime + '&downloadSpeed=4'
@@ -624,7 +624,7 @@ export default {
         stopDownloadRecord: function (callback) {
             this.$refs[this.activePlayer].pause();
             this.videoUrl = '';
-            this.$axios({
+            this.$axios.axios({
                 method: 'get',
                 url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
             }).then((res)=> {
@@ -634,7 +634,7 @@ export default {
         ptzCamera: function (command) {
             console.log('云台控制:' + command);
             let that = this;
-            this.$axios({
+            this.$axios.axios({
                 method: 'post',
                 url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
             }).then(function (res) {});
@@ -646,7 +646,7 @@ export default {
         presetPosition: function (cmdCode, presetPos) {
             console.log('预置位控制:' + this.presetPos + ' : 0x' + cmdCode.toString(16));
             let that = this;
-            this.$axios({
+            this.$axios.axios({
                 method: 'post',
                 url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=0&parameter2=' + presetPos + '&combindCode2=0'
             }).then(function (res) {});
@@ -656,7 +656,7 @@ export default {
             let parameter2 = parameter % 256;
             let combindCode2 = Math.floor(parameter / 256) * 16;
             console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16));
-            this.$axios({
+            this.$axios.axios({
                 method: 'post',
                 url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter2 + '&combindCode2=' + combindCode2
             }).then(function (res) {});
@@ -664,7 +664,7 @@ export default {
         setCommand: function (cmdCode, groupNum, parameter) {
             let that = this;
             console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0');
-            this.$axios({
+            this.$axios.axios({
                 method: 'post',
                 url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter + '&combindCode2=0'
             }).then(function (res) {});
@@ -725,7 +725,7 @@ export default {
         },
         gbPlay(){
           console.log('前端控制:播放');
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: '/api/playback/resume/' + this.streamId
           }).then((res)=> {
@@ -734,14 +734,14 @@ export default {
         },
         gbPause(){
           console.log('前端控制:暂停');
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: '/api/playback/pause/' + this.streamId
           }).then(function (res) {});
         },
         gbScale(command){
           console.log('前端控制:倍速 ' + command);
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: `/api/playback/speed/${this.streamId }/${command}`
           }).then(function (res) {});
@@ -755,7 +755,7 @@ export default {
           let minutes = showTime.getMinutes();
           let seconds = showTime.getSeconds();
           this.showTimeText = (hour < 10?("0" + hour):hour) + ":" + (minutes<10?("0" + minutes):minutes) + ":" + (seconds<10?("0" + seconds):seconds)
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: `/api/playback/seek/${this.streamId }/` + Math.floor(this.seekTime * val / 100000)
           }).then( (res)=> {

+ 1 - 1
web_src/src/components/dialog/editLibItem.vue

@@ -110,7 +110,7 @@ export default {
     async loadLibItemData(){
       this.isLoading = true;
       let url = `/api/device/query/itemInfo/${this.itemId}`
-      let [err,res] = await handle(this.$axios(
+      let [err,res] = await handle(this.$axios.axios(
         {
           method: 'get',
           url: url

+ 2 - 2
web_src/src/components/dialog/getCatalog.vue

@@ -87,7 +87,7 @@ export default {
 
         getCatalog: function(parentId, callback) {
             let that = this;
-            this.$axios({
+            this.$axios.axios({
                     method:"get",
                     url:`/api/platform/catalog`,
                     params: {
@@ -109,7 +109,7 @@ export default {
         },
         loadNode: function(node, resolve){
           if (node.level === 0) {
-            this.$axios({
+            this.$axios.axios({
               method:"get",
               url:`/api/platform/info/` + this.platformId,
             })

+ 1 - 1
web_src/src/components/dialog/importChannel.vue

@@ -64,7 +64,7 @@ export default {
     onSubmit: function () {
       console.log("onSubmit");
       console.log(this.form);
-      this.$axios({
+      this.$axios.axios({
         method:"post",
         url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`,
         data: this.form

+ 1 - 1
web_src/src/components/dialog/onvifEdit.vue

@@ -79,7 +79,7 @@ export default {
     onSubmit: function () {
       console.log("onSubmit");
       console.log(this.form);
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url:`/api/onvif/rtsp`,
         params: {

+ 2 - 2
web_src/src/components/dialog/platformEdit.vue

@@ -192,7 +192,7 @@ export default {
       if (platform == null) {
         this.onSubmit_text = "立即创建";
         this.saveUrl = "/api/platform/add";
-        this.$axios({
+        this.$axios.axios({
           method: 'get',
           url:`/api/platform/server_config`
         }).then(function (res) {
@@ -258,7 +258,7 @@ export default {
       this.saveForm()
     },
     saveForm: function (){
-      this.$axios({
+      this.$axios.axios({
         method: 'post',
         url: this.saveUrl,
         data: this.platform

+ 2 - 2
web_src/src/components/dialog/pushStreamEdit.vue

@@ -107,7 +107,7 @@ export default {
     onSubmit: function () {
       console.log("onSubmit");
       if (this.edit) {
-        this.$axios({
+        this.$axios.axios({
           method:"post",
           url:`/api/push/save_to_gb`,
           data: this.proxyParam
@@ -127,7 +127,7 @@ export default {
           console.log(error);
         });
       }else {
-        this.$axios({
+        this.$axios.axios({
           method:"post",
           url:`/api/push/add`,
           data: this.proxyParam

+ 4 - 4
web_src/src/components/dialog/recordDownload.vue

@@ -81,7 +81,7 @@ export default {
           }, 5000)
         },
         getProgress: function (callback){
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: `/api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}`
           }).then((res)=> {
@@ -134,7 +134,7 @@ export default {
           }
         },
         stopDownloadRecord: function (callback) {
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream
           }).then((res)=> {
@@ -142,7 +142,7 @@ export default {
           });
         },
         getFileDownload: function (){
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/add`,
             params: {
@@ -174,7 +174,7 @@ export default {
           }, 1000)
         },
         getProgressForFile: function (callback){
-          this.$axios({
+          this.$axios.axios({
             method: 'get',
             url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/list`,
             params: {

+ 1 - 1
web_src/src/components/editLib.vue

@@ -110,7 +110,7 @@ export default {
       this.searchKey = searchParam.key;
       this.searchArithmetic = searchParam.lib;
       searchParam.libraryId = this.libraryId;
-      let [err,res] = await handle(this.$axios({
+      let [err,res] = await handle(this.$axios.axios({
         method: 'get',
         url: `/api/device/query/libItems`,
         params: searchParam

+ 1 - 1
web_src/src/components/live.vue

@@ -148,7 +148,7 @@ export default {
       let idxTmp = this.playerIdx
       let that = this;
       this.loading = true
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/play/start/' + deviceId + '/' + channelId
       }).then(function (res) {

+ 1 - 1
web_src/src/components/map.vue

@@ -296,7 +296,7 @@ export default {
       let channelId = channel.channelId;
       console.log("通知设备推流1:" + deviceId + " : " + channelId);
       let that = this;
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: '/api/play/start/' + deviceId + '/' + channelId
       }).then(function (res) {

+ 2 - 2
web_src/src/layout/UiHeader.vue

@@ -87,7 +87,7 @@ export default {
   },
   methods: {
     loginout() {
-      this.$axios({
+      this.$axios.axios({
         method: 'get',
         url: "/api/user/logout"
       }).then((res) => {
@@ -167,7 +167,7 @@ export default {
     async fetchAlarmCount() {
       if (this.requestInProgress) return;
       this.requestInProgress = true;
-      let [err,res] = await handle(this.$axios.get('/ai/unread'));
+      let [err,res] = await handle(this.$axios.get('ai/unread'));
       this.requestInProgress = false;
       setTimeout(() => { this.fetchAlarmCount(); }, this.refreshTime);
       if(err){