优化前端云端录像的播放
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.genersoft.iot.vmp.utils;
|
||||
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||
import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
|
||||
|
||||
public class CloudRecordUtils {
|
||||
|
||||
public static DownloadFileInfo getDownloadFilePath(MediaServerItem mediaServerItem, String filePath) {
|
||||
DownloadFileInfo downloadFileInfo = new DownloadFileInfo();
|
||||
|
||||
String pathTemplate = "%s://%s:%s/index/api/downloadFile?file_path=" + filePath;
|
||||
|
||||
downloadFileInfo.setHttpPath(String.format(pathTemplate, "http", mediaServerItem.getStreamIp(),
|
||||
mediaServerItem.getHttpPort()));
|
||||
|
||||
if (mediaServerItem.getHttpSSlPort() > 0) {
|
||||
downloadFileInfo.setHttpsPath(String.format(pathTemplate, "https", mediaServerItem.getStreamIp(),
|
||||
mediaServerItem.getHttpSSlPort()));
|
||||
}
|
||||
return downloadFileInfo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user