alr query param makes youtube return an URL and not video data
All checks were successful
CI / build (push) Successful in 5m8s
All checks were successful
CI / build (push) Successful in 5m8s
This commit is contained in:
parent
279570d47b
commit
985ef449c5
1 changed files with 4 additions and 3 deletions
|
@ -45,6 +45,7 @@ func videoplayback(w http.ResponseWriter, req *http.Request) {
|
|||
if c == "" {
|
||||
w.WriteHeader(400)
|
||||
io.WriteString(w, "'c' query string undefined.")
|
||||
return
|
||||
}
|
||||
|
||||
host := q.Get("host")
|
||||
|
@ -92,9 +93,9 @@ func videoplayback(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
if c == "WEB" {
|
||||
q.Set("alr", "yes")
|
||||
}
|
||||
// if c == "WEB" {
|
||||
// q.Set("alr", "yes")
|
||||
// }
|
||||
if req.Header.Get("Range") != "" {
|
||||
q.Set("range", req.Header.Get("Range"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue