Commit faf628af authored by Alain Takoudjou's avatar Alain Takoudjou

force transport policy to relay

parent 7cb73a50
...@@ -56,6 +56,7 @@ func IceConfiguration() webrtc.Configuration { ...@@ -56,6 +56,7 @@ func IceConfiguration() webrtc.Configuration {
} }
iceConf = webrtc.Configuration{ iceConf = webrtc.Configuration{
ICEServers: iceServers, ICEServers: iceServers,
ICETransportPolicy: webrtc.ICETransportPolicyRelay,
} }
}) })
......
...@@ -387,6 +387,7 @@ ServerConnection.prototype.newUpStream = function(id) { ...@@ -387,6 +387,7 @@ ServerConnection.prototype.newUpStream = function(id) {
} }
let pc = new RTCPeerConnection({ let pc = new RTCPeerConnection({
iceServers: sc.iceServers || [], iceServers: sc.iceServers || [],
iceTransportPolicy: 'relay',
}); });
if(!pc) if(!pc)
throw new Error("Couldn't create peer connection"); throw new Error("Couldn't create peer connection");
...@@ -495,6 +496,7 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti ...@@ -495,6 +496,7 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti
if(!c) { if(!c) {
let pc = new RTCPeerConnection({ let pc = new RTCPeerConnection({
iceServers: this.iceServers, iceServers: this.iceServers,
iceTransportPolicy: 'relay',
}); });
c = new Stream(this, id, pc); c = new Stream(this, id, pc);
sc.down[id] = c; sc.down[id] = c;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment