单次实时点播持续时间可配置
This commit is contained in:
parent
21f2a50952
commit
b35db44aeb
@ -4,6 +4,7 @@ import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -34,4 +35,9 @@ public class WvpProxyConfig {
|
||||
* 用于生成 代理 wvp 的 视频流 ws-flv 地址
|
||||
*/
|
||||
private String proxyMediaUrl = "";
|
||||
|
||||
/**
|
||||
* 实时视频单次点播持续时间 (默认: 15分钟)
|
||||
*/
|
||||
private Duration realtimeVideoDuration = Duration.ofMinutes(15);
|
||||
}
|
||||
|
@ -392,12 +392,13 @@ public class WvpService {
|
||||
wvpProxyConfig.getProxyMediaUrl(), data.getApp(),
|
||||
StringUtils.joinWith(".", data.getStream(), "live", "flv"));
|
||||
|
||||
|
||||
// 定时任务
|
||||
schedule = scheduledExecutorService.schedule(() -> {
|
||||
log.info("[定时任务] 关闭设备(deviceCode => {}) 视频", deviceCode);
|
||||
playing.remove(deviceCode);
|
||||
closeRealtimeVideo(deviceCode);
|
||||
}, 3, TimeUnit.MINUTES);
|
||||
}, wvpProxyConfig.getRealtimeVideoDuration().getSeconds(), TimeUnit.SECONDS);
|
||||
playing.put(deviceCode, schedule);
|
||||
|
||||
result.setResult(JsonResponse.success(url));
|
||||
|
@ -57,7 +57,10 @@ proxy:
|
||||
parents:
|
||||
- 44050100002000000003
|
||||
- 44050100001180000001
|
||||
# 用于生成 代理 wvp 的 视频流 ws-flv 地址
|
||||
proxy-media-url: 'wss://192.168.1.241:9022/mf-config/media'
|
||||
# 实时视频单次点播持续时间 (默认: 15分钟)
|
||||
realtime-video-duration: 15m
|
||||
gb28181:
|
||||
sip:
|
||||
id: 44050100002000000005
|
||||
|
Loading…
Reference in New Issue
Block a user