录像回放时不进行录像下载

This commit is contained in:
648540858 2021-11-26 23:13:59 +08:00
parent 54568adfdd
commit 0cad0920c6

View File

@ -164,12 +164,20 @@ public class ZLMHttpHookListener {
subscribe.response(mediaInfo, json);
}
}
String app = json.getString("app");
String stream = json.getString("stream");
StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream);
JSONObject ret = new JSONObject();
// 录像回放时不进行录像下载
if (streamInfo != null) {
ret.put("enableMP4", false);
}else {
ret.put("enableMP4", userSetup.isRecordPushLive());
}
ret.put("code", 0);
ret.put("msg", "success");
ret.put("enableHls", true);
ret.put("enableMP4", userSetup.isRecordPushLive());
ret.put("enableRtxp", true);
return new ResponseEntity<String>(ret.toString(), HttpStatus.OK);
}