mirror of
https://github.com/pion/webrtc.git
synced 2025-10-07 08:01:27 +08:00

committed by
Michiel De Backker

parent
756d74196d
commit
7a527fadb3
@@ -52,13 +52,9 @@ func main() {
|
||||
})
|
||||
|
||||
// Wait for the offer to be pasted
|
||||
sd := util.Decode(util.MustReadStdin())
|
||||
offer := util.Decode(util.MustReadStdin())
|
||||
|
||||
// Set the remote SessionDescription
|
||||
offer := webrtc.RTCSessionDescription{
|
||||
Type: webrtc.RTCSdpTypeOffer,
|
||||
Sdp: string(sd),
|
||||
}
|
||||
err = peerConnection.SetRemoteDescription(offer)
|
||||
util.Check(err)
|
||||
|
||||
@@ -67,7 +63,7 @@ func main() {
|
||||
util.Check(err)
|
||||
|
||||
// Output the answer in base64 so we can paste it in browser
|
||||
fmt.Println(util.Encode(answer.Sdp))
|
||||
fmt.Println(util.Encode(answer))
|
||||
|
||||
// Block forever
|
||||
select {}
|
||||
|
Reference in New Issue
Block a user