feat: add query to push and play

This commit is contained in:
langhuihui
2023-06-04 22:46:36 +08:00
parent 5d3f632c15
commit 038e46e4b7
6 changed files with 28 additions and 7 deletions

View File

@@ -155,6 +155,9 @@ func (conf *WebRTCConfig) Play_(w http.ResponseWriter, r *http.Request) {
func (conf *WebRTCConfig) Push_(w http.ResponseWriter, r *http.Request) {
streamPath := r.URL.Path[len("/push/"):]
if r.URL.RawQuery != "" {
streamPath += "?" + r.URL.RawQuery
}
w.Header().Set("Content-Type", "application/sdp")
bytes, err := ioutil.ReadAll(r.Body)
var puber WebRTCPublisher