Skip to content

Commit

Permalink
inherit from simple-peer config
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed May 5, 2020
1 parent ce26b0d commit effb3fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var thunky = require('thunky')
var uploadElement = require('upload-element')
var WebTorrent = require('webtorrent')
var JSZip = require('jszip')
var SimplePeer = require('simple-peer')

var util = require('./util')

Expand All @@ -31,7 +32,10 @@ var getClient = thunky(function (cb) {
if (err) util.error(err)
var client = new WebTorrent({
tracker: {
rtcConfig: rtcConfig
rtcConfig: {
...SimplePeer.config,
...rtcConfig
}
}
})
window.client = client // for easier debugging
Expand Down
5 changes: 4 additions & 1 deletion secret/index-sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ exports.rollbar = {

exports.iceServers = [
{
urls: 'stun:TODO'
urls: 'stun:stun.l.google.com:19302'
},
{
urls: 'stun:global.stun.twilio.com:3478?transport=udp'
},
{
urls: 'turn:TODO:3478?transport=udp',
Expand Down

0 comments on commit effb3fd

Please sign in to comment.