diff --git a/main.go b/main.go index 3b64d00..6086fe4 100644 --- a/main.go +++ b/main.go @@ -26,17 +26,15 @@ var _ = InstallPlugin(&PreviewConfig{}) func (p *PreviewConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/" { - var s string + s := "

Live Streams 引擎中正在发布的流

" Streams.Range(func(streamPath string, stream *Stream) { s += fmt.Sprintf("%s [ %s ]
", streamPath, streamPath, stream.GetType()) }) - if s != "" { - s = "Live Streams
" + s - } + s+= "

pull stream on subscribe 订阅时才会触发拉流的流

" for name, p := range Plugins { if pullcfg, ok := p.Config.(config.PullConfig); ok { if pullonsub := pullcfg.GetPullConfig().PullOnSub; pullonsub != nil { - s += fmt.Sprintf("%s pull stream on subscribe
", name) + s += fmt.Sprintf("

%s

", name) for streamPath, url := range pullonsub { s += fmt.Sprintf("%s <-- %s
", streamPath, streamPath, url) }