Skip to content

Commit

Permalink
Merge pull request codysherman#95 from codysherman/hackillinois-stun-…
Browse files Browse the repository at this point in the history
…server-2020

HackIllinois 2020 STUN server
  • Loading branch information
JohnmarkBeaty authored Feb 29, 2020
2 parents a0e92cf bd949ee commit ceb5283
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
6 changes: 6 additions & 0 deletions src/components/ReceiverConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 82,12 @@ export default {
OfferToReceiveVideo: true,
};
this.connection.candidates = {
stun: true,
turn: true,
};
this.connection.iceTransportPolicy = 'relay';
this.connection.getExternalIceServers = false;
this.connection.iceServers = IceServersHandler.getIceServers();
Expand Down
1 change: 1 addition & 0 deletions src/components/StreamerConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 86,7 @@ export default {
stun: true,
turn: true,
};
this.connection.iceTransportPolicy = 'relay';
this.connection.iceProtocols = {
tcp: true,
Expand Down
25 changes: 15 additions & 10 deletions src/utils/background/helpers/IceServersHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 2,21 @@

export const IceServersHandler = (function() {
function getIceServers() {
var iceServers = [
{
urls: [
'stun:stun.l.google.com:19302',
'stun:stun1.l.google.com:19302',
'stun:stun2.l.google.com:19302',
'stun:stun.l.google.com:19302?transport=udp',
],
},
];
var iceServers = [{
urls: [ 'stun:u3.xirsys.com' ],
}, {
username: 'nCvfkcJAvprAwLpirxzuRpaS2HjkOQ0wGHKJP0M'
'jjyVdA3OI1XdHjcICAykCM6eHAAAAAF5Z2k5wYXJhZGlnbXBvc3Q=',
credential: '850b28c6-5aa3-11ea-98ab-f67d6f96bf8e',
urls: [
'turn:u3.xirsys.com:80?transport=udp',
'turn:u3.xirsys.com:3478?transport=udp',
'turn:u3.xirsys.com:80?transport=tcp',
'turn:u3.xirsys.com:3478?transport=tcp',
'turns:u3.xirsys.com:443?transport=tcp',
'turns:u3.xirsys.com:5349?transport=tcp',
],
}];

return iceServers;
}
Expand Down

0 comments on commit ceb5283

Please sign in to comment.