Obey forceRelay for file transfers.
This commit is contained in:
+3
-3
@@ -2537,7 +2537,7 @@ async function getFile(f) {
|
|||||||
if(f.pc)
|
if(f.pc)
|
||||||
throw new Error("Download already in progress");
|
throw new Error("Download already in progress");
|
||||||
setFileStatus(f, 'Connecting...', true);
|
setFileStatus(f, 'Connecting...', true);
|
||||||
let pc = new RTCPeerConnection(serverConnection.rtcConfiguration);
|
let pc = new RTCPeerConnection(serverConnection.getRTCConfiguration());
|
||||||
if(!pc)
|
if(!pc)
|
||||||
throw new Error("Couldn't create peer connection");
|
throw new Error("Couldn't create peer connection");
|
||||||
f.pc = pc;
|
f.pc = pc;
|
||||||
@@ -2607,7 +2607,7 @@ async function sendOfferedFile(f, sdp) {
|
|||||||
throw new Error('Transfer already in progress');
|
throw new Error('Transfer already in progress');
|
||||||
|
|
||||||
setFileStatus(f, 'Negotiating...', true);
|
setFileStatus(f, 'Negotiating...', true);
|
||||||
let pc = new RTCPeerConnection(serverConnection.rtcConfiguration);
|
let pc = new RTCPeerConnection(serverConnection.getRTCConfiguration());
|
||||||
if(!pc)
|
if(!pc)
|
||||||
throw new Error("Couldn't create peer connection");
|
throw new Error("Couldn't create peer connection");
|
||||||
f.pc = pc;
|
f.pc = pc;
|
||||||
@@ -3527,7 +3527,7 @@ commands.sendfile = {
|
|||||||
async function relayTest() {
|
async function relayTest() {
|
||||||
if(!serverConnection)
|
if(!serverConnection)
|
||||||
throw new Error('not connected');
|
throw new Error('not connected');
|
||||||
let conf = Object.assign({}, serverConnection.rtcConfiguration);
|
let conf = Object.assign({}, serverConnection.getRTCConfiguration());
|
||||||
conf.iceTransportPolicy = 'relay';
|
conf.iceTransportPolicy = 'relay';
|
||||||
let pc1 = new RTCPeerConnection(conf);
|
let pc1 = new RTCPeerConnection(conf);
|
||||||
let pc2 = new RTCPeerConnection(conf);
|
let pc2 = new RTCPeerConnection(conf);
|
||||||
|
|||||||
Reference in New Issue
Block a user