mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 04:22:00 -08:00
hls muxer: change m3u8 Content-Type to application/x-mpegURL
This commit is contained in:
parent
8aa719eda5
commit
680b348902
5 changed files with 6 additions and 6 deletions
|
|
@ -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)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue