diff --git a/relay.go b/relay.go index caed722..4057382 100644 --- a/relay.go +++ b/relay.go @@ -168,13 +168,15 @@ func newCall(mainOffer receivedSignal, r activeRelay) { } // Allow us to receive 1 audio & 1 video track - if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo); err != nil { + if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo, + webrtc.RtpTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { log.Println("Error: could not prepare to receive video track!", err) askForClose(r) return } - if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio); err != nil { + if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio, + webrtc.RtpTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { log.Println("Error: could not prepare to receive audio track!", err) askForClose(r) return