memories/go-vod/transcoder/util.go

16 lines
288 B
Go
Raw Permalink Normal View History

2023-11-01 08:03:28 +00:00
package transcoder
2022-12-03 06:06:03 +00:00
import "net/http"
func GetQueryString(r *http.Request) string {
query := r.URL.Query().Encode()
if query != "" {
query = "?" + query
}
return query
}
func WriteM3U8ContentType(w http.ResponseWriter) {
w.Header().Set("Content-Type", "application/x-mpegURL")
}