修复网页观看问题

pull/1747/head
Li Keqing 2025-01-03 21:40:35 +08:00
parent 469717523b
commit e370cf880d
2 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import com.genersoft.iot.vmp.streamProxy.bean.StreamProxy;
public interface IStreamProxyPlayService { public interface IStreamProxyPlayService {
StreamInfo start(int id);
void start(int id, ErrorCallback<StreamInfo> callback); void start(int id, ErrorCallback<StreamInfo> callback);
StreamInfo startProxy(StreamProxy streamProxy); StreamInfo startProxy(StreamProxy streamProxy);

View File

@ -89,6 +89,15 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
} }
} }
@Override
public StreamInfo start(int id) {
StreamProxy streamProxy = streamProxyMapper.select(id);
if (streamProxy == null) {
throw new ControllerException(ErrorCode.ERROR404.getCode(), "代理信息未找到");
}
return startProxy(streamProxy);
}
@Override @Override
public StreamInfo startProxy(StreamProxy streamProxy){ public StreamInfo startProxy(StreamProxy streamProxy){
if (!streamProxy.isEnable()) { if (!streamProxy.isEnable()) {