dshost-plugin 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core.js +14 -2
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -1456,9 +1456,21 @@ export function startAgent(opts) {
|
|
|
1456
1456
|
|
|
1457
1457
|
const pc = new werift.RTCPeerConnection({
|
|
1458
1458
|
iceServers: [
|
|
1459
|
-
{ urls: 'stun:
|
|
1459
|
+
{ urls: 'stun:39.106.35.187:3478' },
|
|
1460
|
+
{ urls: 'stun:111.206.174.2:3478' },
|
|
1461
|
+
{ urls: 'stun:111.206.174.3:3478' },
|
|
1462
|
+
{ urls: 'stun:47.100.127.239:3478' },
|
|
1460
1463
|
{ urls: 'stun:stun.qq.com:3478' },
|
|
1461
1464
|
{ urls: 'stun:stun.miwifi.com:3478' },
|
|
1465
|
+
{ urls: 'stun:stun.cloudflare.com:3478' },
|
|
1466
|
+
{
|
|
1467
|
+
urls: [
|
|
1468
|
+
'turn:39.106.35.187:3478?transport=udp',
|
|
1469
|
+
'turn:39.106.35.187:3478?transport=tcp',
|
|
1470
|
+
],
|
|
1471
|
+
username: 'dshost',
|
|
1472
|
+
credential: 'dshost_p2p_secret',
|
|
1473
|
+
},
|
|
1462
1474
|
],
|
|
1463
1475
|
});
|
|
1464
1476
|
|
|
@@ -1500,7 +1512,7 @@ export function startAgent(opts) {
|
|
|
1500
1512
|
// 等待 ICE 候选收集(嵌入至 localDescription 中返回,单次 RTT 快速握手)
|
|
1501
1513
|
await new Promise((resolve) => {
|
|
1502
1514
|
if (pc.iceGatheringState === 'complete') return resolve();
|
|
1503
|
-
const timer = setTimeout(resolve,
|
|
1515
|
+
const timer = setTimeout(resolve, 1200);
|
|
1504
1516
|
pc.onicegatheringstatechange = () => {
|
|
1505
1517
|
if (pc.iceGatheringState === 'complete') {
|
|
1506
1518
|
clearTimeout(timer);
|
package/package.json
CHANGED