diff --git a/player/agent/internal/app/app.go b/player/agent/internal/app/app.go index 3c4286d..010fc39 100644 --- a/player/agent/internal/app/app.go +++ b/player/agent/internal/app/app.go @@ -8,6 +8,7 @@ import ( "log" "net/http" "os" + "strings" "sync" "time" @@ -347,6 +348,12 @@ func (a *App) fetchPlaylist(ctx context.Context) { return } + for i := range pr.Items { + if strings.HasPrefix(pr.Items[i].Src, "/") { + pr.Items[i].Src = a.Config.ServerBaseURL + pr.Items[i].Src + } + } + a.playlistMu.Lock() a.playlist = pr.Items a.playlistMu.Unlock()