@abndnce/pulsar-client 0.0.2 → 0.0.4
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/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -30,14 +30,17 @@ async function connectDirect(host, port) {
|
|
|
30
30
|
`a=ice-pwd:${PULSAR_PWD}`,
|
|
31
31
|
`a=fingerprint:sha-256 ${PULSAR_FINGERPRINT}`,
|
|
32
32
|
"a=setup:active",
|
|
33
|
-
"a=sctp-port:5000"
|
|
34
|
-
`a=candidate:1 1 UDP 2130706431 ${host} ${port} typ host`,
|
|
35
|
-
"a=end-of-candidates"
|
|
33
|
+
"a=sctp-port:5000"
|
|
36
34
|
].join("\r\n");
|
|
37
35
|
await pc.setRemoteDescription({
|
|
38
36
|
type: "answer",
|
|
39
37
|
sdp: remoteSdp
|
|
40
38
|
});
|
|
39
|
+
await pc.addIceCandidate({
|
|
40
|
+
candidate: `candidate:1 1 UDP 2130706431 ${host} ${port} typ host`,
|
|
41
|
+
sdpMid: "0",
|
|
42
|
+
sdpMLineIndex: 0
|
|
43
|
+
});
|
|
41
44
|
await new Promise((resolve, reject) => {
|
|
42
45
|
const timeout = setTimeout(() => {
|
|
43
46
|
reject(/* @__PURE__ */ new Error("Connection timed out after 30s"));
|