This commit is contained in:
parent
e8d7b14d82
commit
d2570d9f0a
2 changed files with 0 additions and 34 deletions
|
@ -53,8 +53,6 @@ func Vi(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
// NoRewrite := strings.HasPrefix(resp.Header.Get("Content-Type"), "audio") || strings.HasPrefix(resp.Header.Get("Content-Type"), "video")
|
|
||||||
// copyHeaders(resp.Header, w.Header(), NoRewrite)
|
|
||||||
w.WriteHeader(resp.StatusCode)
|
w.WriteHeader(resp.StatusCode)
|
||||||
|
|
||||||
io.Copy(w, resp.Body)
|
io.Copy(w, resp.Body)
|
||||||
|
|
|
@ -74,42 +74,10 @@ func Videoplayback(w http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
c := q.Get("c")
|
c := q.Get("c")
|
||||||
// if c == "" {
|
|
||||||
// w.WriteHeader(400)
|
|
||||||
// io.WriteString(w, "'c' query string undefined.")
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
host := q.Get("host")
|
host := q.Get("host")
|
||||||
q.Del("host")
|
q.Del("host")
|
||||||
|
|
||||||
// if len(host) <= 0 {
|
|
||||||
// // Fallback to use mvi and mn to build a host
|
|
||||||
// mvi := q.Get("mvi")
|
|
||||||
// mn := strings.Split(q.Get("mn"), ",")
|
|
||||||
|
|
||||||
// if len(mvi) <= 0 {
|
|
||||||
// w.WriteHeader(400)
|
|
||||||
// io.WriteString(w, "'mvi' query string undefined")
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if len(mn) <= 0 {
|
|
||||||
// w.WriteHeader(400)
|
|
||||||
// io.WriteString(w, "'mn' query string undefined")
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// host = "rr" + mvi + "---" + mn[0] + ".googlevideo.com"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if c == "WEB" {
|
|
||||||
// q.Set("alr", "yes")
|
|
||||||
// }
|
|
||||||
// if req.Header.Get("Range") != "" {
|
|
||||||
// q.Set("range", req.Header.Get("Range"))
|
|
||||||
// }
|
|
||||||
|
|
||||||
if req.Header.Get("Range") != "" {
|
if req.Header.Get("Range") != "" {
|
||||||
q.Set("range", strings.Split(req.Header.Get("Range"), "=")[1])
|
q.Set("range", strings.Split(req.Header.Get("Range"), "=")[1])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue