648540858
2024-04-24 c21d973977a9f1d00d26179de764687ddd0ec56c
src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.common;
import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
@@ -76,6 +77,8 @@
    private String endTime;
    @Schema(description = "进度(录像下载使用)")
    private double progress;
    @Schema(description = "文件下载地址(录像下载使用)")
    private DownloadFileInfo downLoadFilePath;
    @Schema(description = "是否暂停(录像回放使用)")
    private boolean pause;
@@ -237,11 +240,11 @@
        }
    }
    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam) {
    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam, boolean isPlay) {
        if (callIdParam != null) {
            callIdParam = Objects.equals(callIdParam, "") ? callIdParam : callIdParam.replace("?", "&");
        }
        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=play%s", app, stream, callIdParam);
        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=%s%s", app, stream, isPlay?"play":"push", callIdParam);
        if (port > 0) {
            this.rtc = new StreamURL("http", host, port, file);
        }
@@ -605,5 +608,11 @@
        this.subStream = subStream;
    }
    public DownloadFileInfo getDownLoadFilePath() {
        return downLoadFilePath;
    }
    public void setDownLoadFilePath(DownloadFileInfo downLoadFilePath) {
        this.downLoadFilePath = downLoadFilePath;
    }
}