Removed client caching, fix for old video having mismatched codecs with new
This commit is contained in:
parent
1cc2a1e3f4
commit
96b9895735
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ func server_setup(server *http.ServeMux) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func serve_vid_segment(w http.ResponseWriter, r *http.Request) {
|
func serve_vid_segment(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Cache-Control", "no-cache")
|
||||||
base_dir, _ := os.UserHomeDir()
|
base_dir, _ := os.UserHomeDir()
|
||||||
tmp := strings.Split(strings.TrimPrefix(r.URL.Path, "/vid/"), "/")
|
tmp := strings.Split(strings.TrimPrefix(r.URL.Path, "/vid/"), "/")
|
||||||
stream_key := tmp[0]
|
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) {
|
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/")
|
stream_id := strings.TrimPrefix(r.URL.Path, "/list/")
|
||||||
base_dir, _ := os.UserHomeDir()
|
base_dir, _ := os.UserHomeDir()
|
||||||
stream_playlist_path := base_dir + "/live/" + stream_id + "/stream.m3u8"
|
stream_playlist_path := base_dir + "/live/" + stream_id + "/stream.m3u8"
|
||||||
|
|
Loading…
Reference in a new issue