Answer the question
In order to leave comments, you need to log in
Golang streaming server + howlerjs not working?
Plz tell me i'm stuck. There is an audio file, and th application. The request for the go service throws howlerjs. The essence of the problem is that the current implementation does not work correctly, the service returns the entire file, but you need something like a stream and for this howlerjs to understand this.
Answer the question
In order to leave comments, you need to log in
I decided that I just needed to write the necessary headers
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Accept-Ranges","bytes")
w.Header(). Set("Content-Type", "audio/mpeg")
w.Header().Set("Content-Length", strconv.Itoa(len(fi)))
w.Header().Set("Content-Range ", "bytes 0-33937193/33937194")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question