Add support for loading the owncast URL in mpv (#1356)
* redirect players to hls link * add VLC to players list
This commit is contained in:
@@ -44,6 +44,11 @@ func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if utils.IsUserAgentAPlayer(r.UserAgent()) && isIndexRequest {
|
||||
http.Redirect(w, r, "/hls/stream.m3u8", http.StatusTemporaryRedirect)
|
||||
return
|
||||
}
|
||||
|
||||
// If the ETags match then return a StatusNotModified
|
||||
if responseCode := middleware.ProcessEtags(w, r); responseCode != 0 {
|
||||
w.WriteHeader(responseCode)
|
||||
|
||||
Reference in New Issue
Block a user