Skip to content

Commit

Permalink
Obey forceRelay for file transfers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jech committed Mar 22, 2022
1 parent 55ae4a6 commit 8aaa6d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/galene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8aaa6d1

Please sign in to comment.