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:
aler9 2022-12-29 20:39:38 +01:00
parent 242fa0bbba
commit 37baa33fc8

View File

@ -285,7 +285,8 @@ func (s *hlsServer) onRequest(ctx *gin.Context) {
dir, fname := func() (string, string) {
if strings.HasSuffix(pa, ".m3u8") ||
strings.HasSuffix(pa, ".ts") ||
strings.HasSuffix(pa, ".mp4") {
strings.HasSuffix(pa, ".mp4") ||
strings.HasSuffix(pa, ".mp") {
return gopath.Dir(pa), gopath.Base(pa)
}
return pa, ""
@ -297,6 +298,10 @@ func (s *hlsServer) onRequest(ctx *gin.Context) {
return
}
if strings.HasSuffix(fname, ".mp") {
fname += "4"
}
dir = strings.TrimSuffix(dir, "/")
hreq := &hlsMuxerRequest{