| | |
| | | package com.genersoft.iot.vmp.common; |
| | | |
| | | import com.genersoft.iot.vmp.media.bean.Track; |
| | | import com.genersoft.iot.vmp.service.bean.DownloadFileInfo; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | |
| | |
| | | @Schema(description = "流媒体ID") |
| | | private String mediaServerId; |
| | | @Schema(description = "流编码信息") |
| | | private Object tracks; |
| | | private Track track; |
| | | @Schema(description = "开始时间") |
| | | private String startTime; |
| | | @Schema(description = "结束时间") |
| | |
| | | } |
| | | } |
| | | |
| | | 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); |
| | | } |
| | |
| | | this.mediaServerId = mediaServerId; |
| | | } |
| | | |
| | | public Object getTracks() { |
| | | return tracks; |
| | | public Track getTrack() { |
| | | return track; |
| | | } |
| | | |
| | | public void setTracks(Object tracks) { |
| | | this.tracks = tracks; |
| | | public void setTrack(Track track) { |
| | | this.track = track; |
| | | } |
| | | |
| | | public String getStartTime() { |