Commit 287d42c1968a53c97ee2eff20bed444d842a41b5
1 parent
c42d3912
推流默认开启音频
Showing
1 changed file
with
1 additions
and
6 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -222,7 +222,7 @@ public class ZLMHttpHookListener { |
| 222 | 222 | |
| 223 | 223 | |
| 224 | 224 | HookResultForOnPublish result = HookResultForOnPublish.SUCCESS(); |
| 225 | - | |
| 225 | + result.setEnable_audio(true); | |
| 226 | 226 | taskExecutor.execute(() -> { |
| 227 | 227 | ZlmHttpHookSubscribe.Event subscribe = this.subscribe.sendNotify(HookType.on_publish, json); |
| 228 | 228 | if (subscribe != null) { |
| ... | ... | @@ -250,7 +250,6 @@ public class ZLMHttpHookListener { |
| 250 | 250 | // 如果是录像下载就设置视频间隔十秒 |
| 251 | 251 | if (ssrcTransactionForAll.get(0).getType() == VideoStreamSessionManager.SessionType.download) { |
| 252 | 252 | result.setMp4_max_second(10); |
| 253 | - result.setEnable_audio(true); | |
| 254 | 253 | result.setEnable_mp4(true); |
| 255 | 254 | } |
| 256 | 255 | } |
| ... | ... | @@ -275,12 +274,8 @@ public class ZLMHttpHookListener { |
| 275 | 274 | } |
| 276 | 275 | if (param.getApp().equalsIgnoreCase("rtp")) { |
| 277 | 276 | String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + param.getStream(); |
| 278 | - System.out.println(receiveKey); | |
| 279 | 277 | OtherRtpSendInfo otherRtpSendInfo = (OtherRtpSendInfo)redisTemplate.opsForValue().get(receiveKey); |
| 280 | - System.out.println("otherRtpSendInfo != null ====>" + (otherRtpSendInfo != null)); | |
| 281 | 278 | if (otherRtpSendInfo != null) { |
| 282 | - System.out.println("otherRtpSendInfo != null"); | |
| 283 | - result.setEnable_audio(true); | |
| 284 | 279 | result.setEnable_mp4(true); |
| 285 | 280 | } |
| 286 | 281 | } | ... | ... |