From 05117be5d63833fab6473ba35620e6e66222acdf Mon Sep 17 00:00:00 2001 From: dexter <178529795@qq.com> Date: Mon, 6 Jun 2022 21:54:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E6=9E=90sdp=E6=97=B6=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E4=BA=86type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index f7ebccf..2e0cd96 100644 --- a/main.go +++ b/main.go @@ -95,7 +95,7 @@ func (conf *WebRTCConfig) Play_(w http.ResponseWriter, r *http.Request) { suber.Info(ice.ToJSON().Candidate) } }) - if err = suber.SetRemoteDescription(SessionDescription{SDP: suber.SDP}); err != nil { + if err = suber.SetRemoteDescription(SessionDescription{Type: SDPTypeOffer, SDP: suber.SDP}); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } @@ -137,7 +137,7 @@ func (conf *WebRTCConfig) Push_(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusBadRequest) return } - if err := puber.SetRemoteDescription(SessionDescription{SDP: puber.SDP}); err != nil { + if err := puber.SetRemoteDescription(SessionDescription{Type: SDPTypeOffer, SDP: puber.SDP}); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return }