Attempt to receive only

This commit is contained in:
Pierre HUBERT 2020-04-11 14:02:46 +02:00
parent 1b3279046e
commit 0d09b436d2

View File

@ -168,13 +168,15 @@ func newCall(mainOffer receivedSignal, r activeRelay) {
} }
// Allow us to receive 1 audio & 1 video track // 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) log.Println("Error: could not prepare to receive video track!", err)
askForClose(r) askForClose(r)
return 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) log.Println("Error: could not prepare to receive audio track!", err)
askForClose(r) askForClose(r)
return return