simple-peer: Explanation of this proposed fix to ICE failures?
I have the same problem, to solve this I’ve change locally simple-peer.js
change this
self._pc = new (self._wrtc.RTCPeerConnection)(self.config, self.constraints)
to this
let my_config = {
iceTransportPolicy: 'relay',
...self.config,
}
self._pc = new (self._wrtc.RTCPeerConnection)(self.config, self.constraints)
problem is in pass only config of servers to RTCPeerConnection
const peer = new SimplePeer({
iceTransportPolicy: 'relay', // this property will ignore
config: {
iceServers: [... ]
}
});
_Originally posted by @rubender in https://github.com/feross/simple-peer/issues/202#issuecomment-425838919_
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16
Hi, I opened a project in GitHub which include the basic example for simple peer Plus IceServer, you can see it here: https://github.com/yaniv-fink/WebRTC-All-Examples/
Also, I added a link to live example here. https://www.videospeeddate.com/chat-simple-peer (If you check the live example you might see the problem when connecting using firefox to chrome)
I created a video on youtube which demonstrates the use of simple-peer. https://www.youtube.com/watch?v=JOQlo-D4ElU&feature=youtu.be
I hope you will find the time to see this material I uploaded and give your opinion about the code.
Thank you