Commit 0cad0920c649f073bb64cae10bd9b573a1d78f4e
1 parent
54568adf
录像回放时不进行录像下载
Showing
1 changed file
with
9 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| @@ -164,12 +164,20 @@ public class ZLMHttpHookListener { | @@ -164,12 +164,20 @@ public class ZLMHttpHookListener { | ||
| 164 | subscribe.response(mediaInfo, json); | 164 | subscribe.response(mediaInfo, json); |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | + String app = json.getString("app"); | ||
| 168 | + String stream = json.getString("stream"); | ||
| 169 | + StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); | ||
| 167 | JSONObject ret = new JSONObject(); | 170 | JSONObject ret = new JSONObject(); |
| 171 | + // 录像回放时不进行录像下载 | ||
| 172 | + if (streamInfo != null) { | ||
| 173 | + ret.put("enableMP4", false); | ||
| 174 | + }else { | ||
| 175 | + ret.put("enableMP4", userSetup.isRecordPushLive()); | ||
| 176 | + } | ||
| 168 | ret.put("code", 0); | 177 | ret.put("code", 0); |
| 169 | ret.put("msg", "success"); | 178 | ret.put("msg", "success"); |
| 170 | ret.put("enableHls", true); | 179 | ret.put("enableHls", true); |
| 171 | ret.put("enableMP4", userSetup.isRecordPushLive()); | 180 | ret.put("enableMP4", userSetup.isRecordPushLive()); |
| 172 | - ret.put("enableRtxp", true); | ||
| 173 | return new ResponseEntity<String>(ret.toString(), HttpStatus.OK); | 181 | return new ResponseEntity<String>(ret.toString(), HttpStatus.OK); |
| 174 | } | 182 | } |
| 175 | 183 |