@factiii/runner 0.9.6 → 0.9.7
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/dist/cli.js +13 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -23847,7 +23847,12 @@ function toRtcIceServers(servers) {
|
|
|
23847
23847
|
port: Number(port ?? (scheme === "turns" ? 5349 : 3478)),
|
|
23848
23848
|
username: server.username,
|
|
23849
23849
|
password: server.credential,
|
|
23850
|
-
|
|
23850
|
+
// String literals, not the RelayType members: it is a `const enum`,
|
|
23851
|
+
// so it is erased at compile time and has no runtime object to read —
|
|
23852
|
+
// `RelayType.TurnUdp` threw, which killed the offer handler before it
|
|
23853
|
+
// could answer and made every connection fail, not just the relayed
|
|
23854
|
+
// ones. The enum's values are exactly these strings.
|
|
23855
|
+
relayType: scheme === "turns" ? "TurnTls" : transport === "tcp" ? "TurnTcp" : "TurnUdp"
|
|
23851
23856
|
});
|
|
23852
23857
|
}
|
|
23853
23858
|
}
|
|
@@ -24133,7 +24138,13 @@ async function startDaemon(config) {
|
|
|
24133
24138
|
console.log(`Received WebRTC offer from ${data.fromSocketId}`);
|
|
24134
24139
|
const scope = toChannelScope(data.scope);
|
|
24135
24140
|
try {
|
|
24136
|
-
|
|
24141
|
+
let iceServers;
|
|
24142
|
+
try {
|
|
24143
|
+
iceServers = toRtcIceServers(data.iceServers);
|
|
24144
|
+
} catch (error) {
|
|
24145
|
+
console.error("[webrtc] ICE server list unusable, using STUN:", error);
|
|
24146
|
+
iceServers = ["stun:stun.l.google.com:19302"];
|
|
24147
|
+
}
|
|
24137
24148
|
console.log(
|
|
24138
24149
|
`[webrtc] ICE servers: ${iceServers.map(
|
|
24139
24150
|
(u) => typeof u === "string" ? u : `${u.relayType}:${u.hostname}:${u.port} user=${u.username?.slice(0, 8)}\u2026`
|
package/package.json
CHANGED