fix: use unit name for HLS path, matching graph name

This commit is contained in:
tian 2026-05-07 15:19:11 +08:00
parent d730413cba
commit f5df6b6da0

View File

@ -357,7 +357,7 @@ func (s *ConfigPreviewService) GetProfileAsset(name string) (*ConfigProfileAsset
VideoSourceRef: unit.VideoSourceRef,
DisplayName: unit.DisplayName,
SiteName: unit.SiteName,
PublishHLSPath: "./web/hls/" + channel + "/index.m3u8",
PublishHLSPath: "./web/hls/" + unit.Name + "/index.m3u8",
PublishRTSPPort: unit.RTSPPort,
PublishRTSPPath: "/live/" + channel,
ChannelNo: channel,
@ -533,7 +533,7 @@ func recognitionUnitToInstanceEditor(unit RecognitionUnitAsset, templateName str
DisplayName: strings.TrimSpace(unit.DisplayName),
SiteName: strings.TrimSpace(unit.SiteName),
ChannelNo: channel,
PublishHLSPath: "./web/hls/" + channel + "/index.m3u8",
PublishHLSPath: "./web/hls/" + unit.Name + "/index.m3u8",
PublishRTSPPort: rtspPort,
PublishRTSPPath: "/live/" + channel,
InputBindings: map[string]InputBindingEditor{
@ -541,7 +541,7 @@ func recognitionUnitToInstanceEditor(unit RecognitionUnitAsset, templateName str
},
OutputBindings: map[string]OutputBindingEditor{
"stream_output_main": {
PublishHLSPath: "./web/hls/" + channel + "/index.m3u8",
PublishHLSPath: "./web/hls/" + unit.Name + "/index.m3u8",
PublishRTSPPort: rtspPort,
PublishRTSPPath: "/live/" + channel,
ChannelNo: channel,
@ -570,7 +570,7 @@ func recognitionUnitToRecord(unit RecognitionUnitAsset) storage.RecognitionUnitR
},
"output_bindings": map[string]any{
"stream_output_main": map[string]any{
"publish_hls_path": "./web/hls/" + channel + "/index.m3u8",
"publish_hls_path": "./web/hls/" + unit.Name + "/index.m3u8",
"publish_rtsp_port": rtspPort,
"publish_rtsp_path": "/live/" + channel,
"channel_no": channel,