From 8aaa6d1466b8b7400f8720a983fd8316f1c32eee Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Wed, 23 Mar 2022 00:12:51 +0100 Subject: [PATCH] Obey forceRelay for file transfers. --- static/galene.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/galene.js b/static/galene.js index 103de4d..5a1401e 100644 --- a/static/galene.js +++ b/static/galene.js @@ -2537,7 +2537,7 @@ async function getFile(f) { if(f.pc) throw new Error("Download already in progress"); setFileStatus(f, 'Connecting...', true); - let pc = new RTCPeerConnection(serverConnection.rtcConfiguration); + let pc = new RTCPeerConnection(serverConnection.getRTCConfiguration()); if(!pc) throw new Error("Couldn't create peer connection"); f.pc = pc; @@ -2607,7 +2607,7 @@ async function sendOfferedFile(f, sdp) { throw new Error('Transfer already in progress'); setFileStatus(f, 'Negotiating...', true); - let pc = new RTCPeerConnection(serverConnection.rtcConfiguration); + let pc = new RTCPeerConnection(serverConnection.getRTCConfiguration()); if(!pc) throw new Error("Couldn't create peer connection"); f.pc = pc; @@ -3527,7 +3527,7 @@ commands.sendfile = { async function relayTest() { if(!serverConnection) throw new Error('not connected'); - let conf = Object.assign({}, serverConnection.rtcConfiguration); + let conf = Object.assign({}, serverConnection.getRTCConfiguration()); conf.iceTransportPolicy = 'relay'; let pc1 = new RTCPeerConnection(conf); let pc2 = new RTCPeerConnection(conf);