Rewrite WebRTC peer connection constructor

This commit is contained in:
Alexey Khit
2023-03-06 17:15:13 +03:00
parent 03a4393ce3
commit 1e83dc85f7
3 changed files with 11 additions and 10 deletions

View File

@@ -139,7 +139,7 @@ func inputWebRTC(w http.ResponseWriter, r *http.Request) {
log.Trace().Msgf("[webrtc] WHIP offer\n%s", offer)
pc, err := newPeerConnection(true)
pc, err := PeerConnection(false)
if err != nil {
log.Error().Err(err).Caller().Send()
http.Error(w, err.Error(), http.StatusInternalServerError)