This commit is contained in:
parent
71aa6edd67
commit
a9c845651d
1 changed files with 0 additions and 2 deletions
|
@ -183,12 +183,10 @@ func Videoplayback(w http.ResponseWriter, req *http.Request) {
|
|||
// "bytes=500-1000" get 500 bytes starting from 500
|
||||
byteParts := strings.Split(requestBytes, "-")
|
||||
firstByte, lastByte := byteParts[0], byteParts[1]
|
||||
fmt.Println(byteParts)
|
||||
if lastByte != "" {
|
||||
w.Header().Add("content-range", "bytes "+requestBytes+"/*")
|
||||
w.WriteHeader(206)
|
||||
} else {
|
||||
fmt.Println("nolastbyte")
|
||||
// i.e. "bytes=0-", "bytes=600-"
|
||||
// full size of content is able to be calculated, so a full Content-Range header can be constructed
|
||||
bytesReceived := resp.Header.Get("content-length")
|
||||
|
|
Loading…
Add table
Reference in a new issue