hls muxer: change m3u8 Content-Type to application/x-mpegURL

This commit is contained in:
aler9 2022-10-18 11:02:48 +02:00
parent 8aa719eda5
commit 680b348902
5 changed files with 6 additions and 6 deletions

View file

@ -54,7 +54,7 @@ func (ts *testHLSServer) onPlaylist(ctx *gin.Context) {
segment.ts
`
ctx.Writer.Header().Set("Content-Type", `audio/mpegURL`)
ctx.Writer.Header().Set("Content-Type", `application/x-mpegURL`)
io.Copy(ctx.Writer, bytes.NewReader([]byte(cnt)))
}

View file

@ -122,7 +122,7 @@ func newTestHLSServer(ca string) (*testHLSServer, error) {
#EXTINF:2,
` + segment + "\n"
ctx.Writer.Header().Set("Content-Type", `audio/mpegURL`)
ctx.Writer.Header().Set("Content-Type", `application/x-mpegURL`)
io.Copy(ctx.Writer, bytes.NewReader([]byte(cnt)))
})

View file

@ -33,7 +33,7 @@ func (p *muxerPrimaryPlaylist) file() *MuxerFileResponse {
return &MuxerFileResponse{
Status: http.StatusOK,
Header: map[string]string{
"Content-Type": `audio/mpegURL`,
"Content-Type": `application/x-mpegURL`,
},
Body: func() io.Reader {
var codecs []string

View file

@ -221,7 +221,7 @@ func (p *muxerVariantFMP4Playlist) playlistReader(msn string, part string, skip
return &MuxerFileResponse{
Status: http.StatusOK,
Header: map[string]string{
"Content-Type": `audio/mpegURL`,
"Content-Type": `application/x-mpegURL`,
},
Body: p.fullPlaylist(isDeltaUpdate),
}
@ -247,7 +247,7 @@ func (p *muxerVariantFMP4Playlist) playlistReader(msn string, part string, skip
return &MuxerFileResponse{
Status: http.StatusOK,
Header: map[string]string{
"Content-Type": `audio/mpegURL`,
"Content-Type": `application/x-mpegURL`,
},
Body: p.fullPlaylist(isDeltaUpdate),
}

View file

@ -101,7 +101,7 @@ func (p *muxerVariantMPEGTSPlaylist) playlistReader() *MuxerFileResponse {
return &MuxerFileResponse{
Status: http.StatusOK,
Header: map[string]string{
"Content-Type": `audio/mpegURL`,
"Content-Type": `application/x-mpegURL`,
},
Body: p.playlist(),
}