mirror of
https://github.com/Monibuca/plugin-hdl.git
synced 2025-10-01 07:02:25 +08:00
🐛 FIX: 增对路径传参的支持
This commit is contained in:
3
main.go
3
main.go
@@ -120,6 +120,9 @@ func (sub *HDLSubscriber) OnEvent(event any) {
|
|||||||
|
|
||||||
func (*HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (*HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl/"), ".flv")
|
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl/"), ".flv")
|
||||||
|
if r.URL.RawQuery != "" {
|
||||||
|
streamPath += "?" + r.URL.RawQuery
|
||||||
|
}
|
||||||
w.Header().Set("Transfer-Encoding", "chunked")
|
w.Header().Set("Transfer-Encoding", "chunked")
|
||||||
w.Header().Set("Content-Type", "video/x-flv")
|
w.Header().Set("Content-Type", "video/x-flv")
|
||||||
sub := &HDLSubscriber{}
|
sub := &HDLSubscriber{}
|
||||||
|
Reference in New Issue
Block a user