Removed client caching, fix for old video having mismatched codecs with new

This commit is contained in:
Muaz Ahmad 2023-09-22 12:33:31 +05:00
parent 1cc2a1e3f4
commit 96b9895735

View file

@ -24,6 +24,7 @@ func server_setup(server *http.ServeMux) {
}
func serve_vid_segment(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
base_dir, _ := os.UserHomeDir()
tmp := strings.Split(strings.TrimPrefix(r.URL.Path, "/vid/"), "/")
stream_key := tmp[0]
@ -32,6 +33,7 @@ func serve_vid_segment(w http.ResponseWriter, r *http.Request) {
}
func serve_live_playlist(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
stream_id := strings.TrimPrefix(r.URL.Path, "/list/")
base_dir, _ := os.UserHomeDir()
stream_playlist_path := base_dir + "/live/" + stream_id + "/stream.m3u8"