mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-02 12:42:21 +00:00
hls muxer: add workaround for bug on latest iPhone iOS
In iPhone iOs 16.1.1, the EXT-X-PRELOAD-HINT file is requested without the last character, and "partXX.mp4" becomes "partXX.mp"
This commit is contained in:
parent
242fa0bbba
commit
37baa33fc8
@ -285,7 +285,8 @@ func (s *hlsServer) onRequest(ctx *gin.Context) {
|
|||||||
dir, fname := func() (string, string) {
|
dir, fname := func() (string, string) {
|
||||||
if strings.HasSuffix(pa, ".m3u8") ||
|
if strings.HasSuffix(pa, ".m3u8") ||
|
||||||
strings.HasSuffix(pa, ".ts") ||
|
strings.HasSuffix(pa, ".ts") ||
|
||||||
strings.HasSuffix(pa, ".mp4") {
|
strings.HasSuffix(pa, ".mp4") ||
|
||||||
|
strings.HasSuffix(pa, ".mp") {
|
||||||
return gopath.Dir(pa), gopath.Base(pa)
|
return gopath.Dir(pa), gopath.Base(pa)
|
||||||
}
|
}
|
||||||
return pa, ""
|
return pa, ""
|
||||||
@ -297,6 +298,10 @@ func (s *hlsServer) onRequest(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.HasSuffix(fname, ".mp") {
|
||||||
|
fname += "4"
|
||||||
|
}
|
||||||
|
|
||||||
dir = strings.TrimSuffix(dir, "/")
|
dir = strings.TrimSuffix(dir, "/")
|
||||||
|
|
||||||
hreq := &hlsMuxerRequest{
|
hreq := &hlsMuxerRequest{
|
||||||
|
Loading…
Reference in New Issue
Block a user