mirror of
https://github.com/amark/gun.git
synced 2025-06-05 13:46:43 +00:00
Fix offer payload (#1210)
This commit is contained in:
parent
2c3e7d55fd
commit
1051e477ba
@ -52,6 +52,7 @@
|
||||
delete opt.announce[rtc.id]; /// remove after connect
|
||||
if(tmp = rtc.answer){
|
||||
if(!(peer = opt.peers[rtc.id] || open[rtc.id]) || peer.remoteSet){ return }
|
||||
tmp.sdp = tmp.sdp.replace(/\\r\\n/g, '\r\n')
|
||||
return peer.setRemoteDescription(peer.remoteSet = new opt.RTCSessionDescription(tmp));
|
||||
}
|
||||
if(tmp = rtc.candidate){
|
||||
@ -88,6 +89,7 @@
|
||||
rc.onclose = wire.onclose;
|
||||
}
|
||||
if(tmp = rtc.offer){
|
||||
rtc.offer.sdp = rtc.offer.sdp.replace(/\\r\\n/g, '\r\n')
|
||||
peer.setRemoteDescription(new opt.RTCSessionDescription(tmp));
|
||||
peer.createAnswer(function(answer){
|
||||
peer.setLocalDescription(answer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user