|  |  | 
 |  |  |     private AudioBroadcastManager audioBroadcastManager;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private ZLMServerFactory zlmServerFactory;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private IPlayService playService;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  | 
 |  |  |     private VideoStreamSessionManager sessionManager;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private AssistRESTfulUtils assistRESTfulUtils;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private SSRCFactory ssrcFactory;
 | 
 |  |  | 
 | 
 |  |  |     @Qualifier("taskExecutor")
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |         taskExecutor.execute(() -> {
 | 
 |  |  |             List<ZlmHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_server_keepalive);
 | 
 |  |  |             if (subscribes != null && subscribes.size() > 0) {
 | 
 |  |  |             if (subscribes != null && !subscribes.isEmpty()) {
 | 
 |  |  |                 for (ZlmHttpHookSubscribe.Event subscribe : subscribes) {
 | 
 |  |  |                     subscribe.response(null, param);
 | 
 |  |  |                 }
 | 
 |  |  | 
 |  |  |     @PostMapping(value = "/on_play", produces = "application/json;charset=UTF-8")
 | 
 |  |  |     public HookResult onPlay(@RequestBody OnPlayHookParam param) {
 | 
 |  |  |         if (logger.isDebugEnabled()) {
 | 
 |  |  |             logger.debug("[ZLM HOOK] 播放鉴权:{}->{}" + param.getMediaServerId(), param);
 | 
 |  |  |             logger.debug("[ZLM HOOK] 播放鉴权:{}->{}", param.getMediaServerId(), param);
 | 
 |  |  |         }
 | 
 |  |  |         String mediaServerId = param.getMediaServerId();
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |         taskExecutor.execute(() -> {
 | 
 |  |  |             ZlmHttpHookSubscribe.Event subscribe = this.subscribe.sendNotify(HookType.on_publish, json);
 | 
 |  |  |             if (subscribe != null) {
 | 
 |  |  |                 if (mediaInfo != null) {
 | 
 |  |  |                     subscribe.response(mediaInfo, param);
 | 
 |  |  |                 } else {
 | 
 |  |  |                     new HookResultForOnPublish(1, "zlm not register");
 | 
 |  |  |                 }
 | 
 |  |  |                 subscribe.response(mediaInfo, param);
 | 
 |  |  |             }
 | 
 |  |  |         });
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |                 }
 | 
 |  |  |                 // 收到无人观看说明流也没有在往上级推送
 | 
 |  |  |                 if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) {
 | 
 |  |  |                     List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId(
 | 
 |  |  |                     List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChannelId(
 | 
 |  |  |                             inviteInfo.getChannelId());
 | 
 |  |  |                     if (!sendRtpItems.isEmpty()) {
 | 
 |  |  |                         for (SendRtpItem sendRtpItem : sendRtpItems) {
 | 
 |  |  | 
 |  |  |         logger.info("[ZLM HOOK] zlm 启动 " + zlmServerConfig.getGeneralMediaServerId());
 | 
 |  |  |         taskExecutor.execute(() -> {
 | 
 |  |  |             List<ZlmHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_server_started);
 | 
 |  |  |             if (subscribes != null && subscribes.size() > 0) {
 | 
 |  |  |             if (subscribes != null && !subscribes.isEmpty()) {
 | 
 |  |  |                 for (ZlmHttpHookSubscribe.Event subscribe : subscribes) {
 | 
 |  |  |                     subscribe.response(null, zlmServerConfig);
 | 
 |  |  |                 }
 | 
 |  |  | 
 |  |  |      */
 | 
 |  |  |     @ResponseBody
 | 
 |  |  |     @PostMapping(value = "/on_rtp_server_timeout", produces = "application/json;charset=UTF-8")
 | 
 |  |  |     public HookResult onRtpServerTimeout(HttpServletRequest request, @RequestBody OnRtpServerTimeoutHookParam
 | 
 |  |  |     public HookResult onRtpServerTimeout(@RequestBody OnRtpServerTimeoutHookParam
 | 
 |  |  |             param) {
 | 
 |  |  |         logger.info("[ZLM HOOK] rtpServer收流超时:{}->{}({})", param.getMediaServerId(), param.getStream_id(), param.getSsrc());
 | 
 |  |  | 
 | 
 |  |  |         taskExecutor.execute(() -> {
 | 
 |  |  |             JSONObject json = (JSONObject) JSON.toJSON(param);
 | 
 |  |  |             List<ZlmHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_rtp_server_timeout);
 | 
 |  |  |             if (subscribes != null && !subscribes.isEmpty()) {
 | 
 |  |  |                 for (ZlmHttpHookSubscribe.Event subscribe : subscribes) {
 |