Skip to content

Commit 15ba1cd

Browse files
committed
update config
1 parent ee748de commit 15ba1cd

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

test/common.js

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1-
const get = require('simple-get')
2-
const thunky = require('thunky')
31
const bowser = require('bowser')
42

5-
exports.getConfig = thunky(function (cb) {
6-
// Includes TURN -- needed for tests to pass on Sauce Labs
7-
// https://github.com/feross/simple-peer/issues/41
8-
// WARNING: This is *NOT* a public endpoint. Do not depend on it in your app.
9-
get.concat('https://instant.io/__rtcConfig__', function (err, res, data) {
10-
if (err) return cb(err)
11-
data = data.toString()
12-
try {
13-
data = JSON.parse(data)
14-
} catch (err) {
15-
cb(err)
16-
return
3+
exports.getConfig = cb => {
4+
const data = {
5+
rtcConfig: {
6+
iceServers: [
7+
{
8+
urls: [
9+
'stun:stun.l.google.com:19302',
10+
'stun:global.stun.twilio.com:3478'
11+
]
12+
},
13+
{
14+
urls: [
15+
'turn:relay.socket.dev:443?transport=udp',
16+
'turn:relay.socket.dev:443?transport=tcp',
17+
'turns:relay.socket.dev:443?transport=tcp'
18+
],
19+
username: 'relay.socket.dev',
20+
credential: 'tears-whiplash-overall-diction'
21+
}
22+
],
23+
sdpSemantics: 'unified-plan',
24+
bundlePolicy: 'max-bundle',
25+
iceCandidatePoolsize: 1
1726
}
18-
cb(null, data)
19-
})
20-
})
27+
}
28+
cb(null, data)
29+
}
2130

2231
// For testing on node, we must provide a WebRTC implementation
2332
if (process.env.WRTC?.startsWith('wrtc')) {

0 commit comments

Comments
 (0)