Add player error handling and hls fallback

This commit is contained in:
2025-10-19 17:32:18 +02:00
parent 816ee8de14
commit 8fea8b1fe7
5 changed files with 276 additions and 199 deletions

View File

@@ -69,6 +69,7 @@ func (h *shandler) GetMaster(c echo.Context) error {
if err != nil {
return err
}
c.Response().Header().Set("Content-Type", "application/vnd.apple.mpegurl")
return c.String(http.StatusOK, ret)
}
@@ -104,6 +105,7 @@ func (h *shandler) GetVideoIndex(c echo.Context) error {
if err != nil {
return err
}
c.Response().Header().Set("Content-Type", "application/vnd.apple.mpegurl")
return c.String(http.StatusOK, ret)
}
@@ -135,6 +137,7 @@ func (h *shandler) GetAudioIndex(c echo.Context) error {
if err != nil {
return err
}
c.Response().Header().Set("Content-Type", "application/vnd.apple.mpegurl")
return c.String(http.StatusOK, ret)
}